Hi All,

I noticed that QWebPage::inputMethodQuery(Qt::ImCursorPosition) seems to prefer 
to return the end index (renderTextControl->selectionEnd()) of a selection 
inside an input field. This seems to work correctly and return the current 
cursor position when the user is just traversing the characters (in which case 
the selection is empty and start=end index) OR when the user starts selecting 
the text (or a part of it) in a LEFT to RIGHT direction with respect to a base 
starting position.

But if the text is selected from RIGHT to LEFT, the cursor position is always 
equal to the base index (basically the end index) from where the text selection 
was started and never changes as the selection moves left.

Not sure if this is a bug or my understanding is incorrect but it seems 
different from how this works in a QLineEdit. I was thinking instead of 
returning

renderTextControl->selectionEnd()

it should return something like:

frame->selection()->extent().offsetInContainerNode()

since the extent offset always has the current cursor position inside an input 
field.

Can someone please confirm?
Thanks,

--Rajiv
_______________________________________________
webkit-qt mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt

Reply via email to