зеркало из https://github.com/mozilla/gecko-dev.git
Bug 562717 - Form helper should disappear when reloading the page [r=mfinkle]
This commit is contained in:
Родитель
8ec95d318b
Коммит
a5de77773e
|
@ -68,8 +68,6 @@ const kStateActive = 0x00000001;
|
|||
* Currently, the InputHandler listens for the following events by default.
|
||||
*
|
||||
* On the Fennec global chrome window:
|
||||
* URLChanged
|
||||
* TabSelect
|
||||
* mousedown
|
||||
* mouseup
|
||||
* mousemove
|
||||
|
|
|
@ -486,9 +486,6 @@ var BrowserUI = {
|
|||
// Update the navigation buttons
|
||||
this._updateButtons(browser);
|
||||
|
||||
// Close the forms assistant
|
||||
FormHelper.close();
|
||||
|
||||
// Check for a bookmarked page
|
||||
this.updateStar();
|
||||
|
||||
|
@ -1654,6 +1651,9 @@ var FormMessageReceiver = {
|
|||
messageManager.addMessageListener("FormAssist:Hide", this);
|
||||
messageManager.addMessageListener("FormAssist:Update", this);
|
||||
messageManager.addMessageListener("FormAssist:AutoComplete", this);
|
||||
|
||||
document.getElementById("tabs").addEventListener("TabSelect", this, true);
|
||||
document.getElementById("browsers").addEventListener("URLChanged", this, true);
|
||||
},
|
||||
|
||||
receiveMessage: function(aMessage) {
|
||||
|
@ -1686,6 +1686,11 @@ var FormMessageReceiver = {
|
|||
}
|
||||
},
|
||||
|
||||
handleEvent: function(aEvent) {
|
||||
if (aEvent.type == "TabSelect" || aEvent.type == "URLChanged")
|
||||
FormHelper.close();
|
||||
},
|
||||
|
||||
_getOffsetForCaret: function formHelper_getOffsetForCaret(aCaretRect, aRect) {
|
||||
// Determine if we need to move left or right to bring the caret into view
|
||||
let deltaX = 0;
|
||||
|
|
|
@ -2329,7 +2329,6 @@ ProgressController.prototype = {
|
|||
BrowserUI.updateURI();
|
||||
}
|
||||
|
||||
// broadcast a URLChanged message for consumption by InputHandler
|
||||
let event = document.createEvent("Events");
|
||||
event.initEvent("URLChanged", true, false);
|
||||
this.browser.dispatchEvent(event);
|
||||
|
|
Загрузка…
Ссылка в новой задаче