Bug 741831 - Readonly text inputs can trigger form autocomplete popups. r+a=mfinkle
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Sun, 22 Apr 2012 09:58:29 -0700
changeset 92099 6c8fe1624a6bd82758e6e38344ddedd35bd9d376
parent 92098 1f4f4d6466b67ef525444e82ea2ca596cee98c12
child 92100 e2af0b79da44efb6b6256109944974889e83d3f0
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs741831
milestone14.0a1
Bug 741831 - Readonly text inputs can trigger form autocomplete popups. r+a=mfinkle
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -3063,17 +3063,17 @@ var FormAssistant = {
         let selectedDocument = BrowserApp.selectedBrowser.contentDocument;
         if (target == selectedDocument || target.ownerDocument == selectedDocument)
           this._invalidSubmit = false;
     }
   },
 
   // We only want to show autocomplete suggestions for certain elements
   _isAutoComplete: function _isAutoComplete(aElement) {
-    if (!(aElement instanceof HTMLInputElement) ||
+    if (!(aElement instanceof HTMLInputElement) || aElement.readOnly ||
         (aElement.getAttribute("type") == "password") ||
         (aElement.hasAttribute("autocomplete") &&
          aElement.getAttribute("autocomplete").toLowerCase() == "off"))
       return false;
 
     return true;
   },