Bug 639530 - Suggestions bubble persists on results page after filling out the search form [r=mfinkle]

This commit is contained in:
Vivien Nicolas 2011-05-09 13:28:48 +02:00
parent dd83f17e32
commit c9c12d46d1

View File

@ -79,6 +79,7 @@ function FormAssistant() {
addEventListener("focus", this, true);
addEventListener("pageshow", this, false);
addEventListener("pagehide", this, false);
addEventListener("submit", this, false);
this._enabled = Services.prefs.getBoolPref("formhelper.enabled");
};
@ -295,6 +296,11 @@ FormAssistant.prototype = {
let currentElement = this.currentElement;
switch (aEvent.type) {
case "submit":
// submit is a final action and the form assistant should be closed
this.close();
break;
case "pagehide":
case "pageshow":
// When reacting to a page show/hide, if the focus is different this