Bug 1026788 - Reinsert composition after removing autocomplete text; r=wesj
authorJim Chen <nchen@mozilla.com>
Mon, 30 Jun 2014 13:24:06 -0400
changeset 191555 78517fe424721a392e0d7f78cdcfb315036a55a4
parent 191554 2b89f72bc855d709fcfc6509966a52e3e16bdace
child 191556 c94f041648c656e75e005f81c51fee4acff4363f
push id45618
push userkwierso@gmail.com
push dateTue, 01 Jul 2014 01:47:43 +0000
treeherdermozilla-inbound@d0787b1eebc1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs1026788
milestone33.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 1026788 - Reinsert composition after removing autocomplete text; r=wesj
mobile/android/base/toolbar/ToolbarEditText.java
--- a/mobile/android/base/toolbar/ToolbarEditText.java
+++ b/mobile/android/base/toolbar/ToolbarEditText.java
@@ -387,16 +387,19 @@ public class ToolbarEditText extends Cus
                 // i.e. when the composing text is getting shorter.
                 if (composingStart >= 0 &&
                     composingEnd >= 0 &&
                     (composingEnd - composingStart) > text.length() &&
                     removeAutocomplete(editable)) {
                     // Make the IME aware that we interrupted the setComposingText call,
                     // by having finishComposingText() send change notifications to the IME.
                     finishComposingText();
+                    if (Build.VERSION.SDK_INT >= 9) {
+                        setComposingRegion(composingStart, composingEnd);
+                    }
                     return true;
                 }
                 return false;
             }
 
             @Override
             public boolean commitText(CharSequence text, int newCursorPosition) {
                 if (removeAutocompleteOnComposing(text)) {