[Webkit-unassigned] [Bug 45539] New: [Qt] Send an inputmethodevent with empty preedit string causes the selected text gets deleted
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 10 07:40:39 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=45539
Summary: [Qt] Send an inputmethodevent with empty preedit
string causes the selected text gets deleted
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: Mac OS X 10.5
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: WebKit Qt
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: yi.4.shen at nokia.com
Precondition: using qgraphicswebview
Steps to reproduce:
1. open a page that has a textarea field, and type some characters in that field (e.g. I typed "abcdefg" in the textarea)
2. use your mouse to select (highlight) some words (characters) (e.g. I selected "defg")
3. click on other qgraphics ui component (e.g. url bar) which removes the focus from qgraphicswebview
Actual Result:
All the selected/highlight words (characters) get deleted (e.g. the "defg" get deleted and only "abcd" left in the textarea)
Reason:
When focus changed, qgraphicssence sends out an inputmethodevent with empty preedit string and empty QInputMethodEvent::Attribute to qgrapchiswebview, which finally be delivered to the QWebPage::inputMethodEvent(QInputMethodEvent *ev). And eventually, an empty preedit string is passed to WebCore::Editor::setComposition(...) which deletes all the selected text.
Fix proposal:
Check the preedit string before passing it to the WebCore::Editor::setComposition.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list