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 2011 fb1e3fb7ec8a32b266032eed797f669ccb0dc9fd
parent 2010 58a422b67717c6825102c92e986fe70d7fe3b39a
child 2012 25d089c480c8318880ac7e267f3c5524517eca57
push id1716
push usermfinkle@mozilla.com
push dateThu, 16 Sep 2010 03:35:31 +0000
reviewersmark.finkle
bugs596741
Bug 596741 - "Regression: Password Manager does not fill in password immediately after selecting username" [r=mark.finkle]
chrome/content/forms.js
--- a/chrome/content/forms.js
+++ b/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++) {