Bug 562717 - Form helper should disappear when reloading the page [r=mfinkle]

This commit is contained in:
Vivien Nicolas 2010-07-02 07:50:47 +02:00
Родитель 8ec95d318b
Коммит a5de77773e
3 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -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);