Bug 758820 - Suppress form auto-complete popup after the user starts typing. r=blassey a=blassey
authorChris Peterson <cpeterson@mozilla.com>
Tue, 12 Jun 2012 13:12:57 -0700
changeset 98105 e84c8cfbb27c7b2500596219c2e6a6c96c2b236c
parent 98104 19a31aa9314305696b655963898142995c083705
child 98106 4223ec8761b398002967c5a0b1043d4238c6967f
push id1492
push usercpeterson@mozilla.com
push dateTue, 12 Jun 2012 20:13:56 +0000
treeherdermozilla-aurora@e84c8cfbb27c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey, blassey
bugs758820
milestone15.0a2
Bug 758820 - Suppress form auto-complete popup after the user starts typing. r=blassey a=blassey
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -3473,16 +3473,22 @@ var FormAssistant = {
 
   // Retrieves autocomplete suggestions for an element from the form autocomplete service
   // and sends the suggestions to the Java UI, along with element position data.
   // Returns true if there are suggestions to show, false otherwise.
   _showAutoCompleteSuggestions: function _showAutoCompleteSuggestions(aElement) {
     if (!this._isAutoComplete(aElement))
       return false;
 
+    // Don't display the form auto-complete popup after the user starts typing
+    // to avoid confusing the IME. See bug 758820 and bug 632744.
+    if (aElement.value.length > 0) {
+        return false;
+    }
+
     let autoCompleteSuggestions = this._getAutoCompleteSuggestions(aElement.value, aElement);
     let listSuggestions = this._getListSuggestions(aElement);
 
     // On desktop, we show datalist suggestions below autocomplete suggestions,
     // without duplicates removed.
     let suggestions = autoCompleteSuggestions.concat(listSuggestions);
 
     // Return false if there are no suggestions to show