Bug 1017651 - Reshow cursor once autocomplete text is gone; r=wesj
authorJim Chen <nchen@mozilla.com>
Wed, 04 Jun 2014 12:19:19 -0400
changeset 206883 0a3b529d97ca3724aced508a270e3758c1c2925d
parent 206882 41817bdae9f03bd8d4d6fe475bc1f85181e40074
child 206884 36bc7df3eed5c18b2df04c2aec8e799af54de3b6
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs1017651
milestone32.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 1017651 - Reshow cursor once autocomplete text is gone; r=wesj
mobile/android/base/toolbar/ToolbarEditText.java
--- a/mobile/android/base/toolbar/ToolbarEditText.java
+++ b/mobile/android/base/toolbar/ToolbarEditText.java
@@ -255,16 +255,21 @@ public class ToolbarEditText extends Cus
             }
 
             beginSettingAutocomplete();
 
             // Replace the existing autocomplete text with new one.
             // replace() preserves the autocomplete spans that we set before.
             text.replace(autoCompleteStart, textLength, result, autoCompleteStart, resultLength);
 
+            // Reshow the cursor if there is no longer any autocomplete text.
+            if (autoCompleteStart == resultLength) {
+                setCursorVisible(true);
+            }
+
             endSettingAutocomplete();
 
         } else {
             // No autocomplete text yet; we should add autocomplete text
 
             // If the result prefix doesn't match the current text,
             // the result is stale and we should wait for the another result to come in.
             if (resultLength <= textLength ||