Bug 596741 - "Regression: Password Manager does not fill in password immediately after selecting username" [r=mark.finkle]
authorMatt Brubeck <mbrubeck@mozilla.com>
Wed, 15 Sep 2010 14:27:00 -0400
changeset 66655 a385b2c15f49eb244751f9568ee143951d719429
parent 66654 aa8e00964671c031d13490d5229453378339dc9a
child 66656 63486a1aff869604f7a3805ed876ee946e8e0d25
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmark
bugs596741
Bug 596741 - "Regression: Password Manager does not fill in password immediately after selecting username" [r=mark.finkle]
mobile/chrome/content/forms.js
--- a/mobile/chrome/content/forms.js
+++ b/mobile/chrome/content/forms.js
@@ -159,19 +159,24 @@ FormAssistant.prototype = {
 
       case "FormAssist:ChoiceChange": {
         // ChoiceChange happened once we have move to an other element so we 
         // should remenber the used wrapper
         this._selectWrapper.fireOnChange();
         break;
       }
 
-      case "FormAssist:AutoComplete":
+      case "FormAssist:AutoComplete": {
         currentElement.value = json.value;
+
+        let event = currentElement.ownerDocument.createEvent("Events");
+        event.initEvent("DOMAutoComplete", true, true);
+        currentElement.dispatchEvent(event);
         break;
+      }
     }
   },
 
   _els: Cc["@mozilla.org/eventlistenerservice;1"].getService(Ci.nsIEventListenerService),
   _hasKeyListener: function _hasKeyListener(aElement) {
     let els = this._els;
     let listeners = els.getListenerInfoFor(aElement, {});
     for (let i = 0; i < listeners.length; i++) {