Bug 856155 - End IME composition before sending touch events to content. r=jchen
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 04 Apr 2013 02:08:16 -0400
changeset 127625 b50cc6512288ead34bde14a77d5d531e50295d60
parent 127624 343da9f79907e562799c3f7302a072f7c4a9e888
child 127626 2c3ca8354b1e0a304af50ee3cb7e815e776ec056
push id24509
push userryanvm@gmail.com
push dateFri, 05 Apr 2013 00:57:47 +0000
treeherdermozilla-central@55f9e3e3dae7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjchen
bugs856155
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 856155 - End IME composition before sending touch events to content. r=jchen
widget/android/nsWindow.cpp
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -1183,16 +1183,20 @@ send_again:
         goto send_again;
     }
 }
 
 bool nsWindow::OnMultitouchEvent(AndroidGeckoEvent *ae)
 {
     nsRefPtr<nsWindow> kungFuDeathGrip(this);
 
+    // End any composition in progress in case the touch event listener
+    // modifies the input field value (see bug 856155)
+    RemoveIMEComposition();
+
     // This is set to true once we have called SetPreventPanning() exactly
     // once for a given sequence of touch events. It is reset on the start
     // of the next sequence.
     static bool sDefaultPreventedNotified = false;
     static bool sLastWasDownEvent = false;
 
     bool preventDefaultActions = false;
     bool isDownEvent = false;