mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 629661 - Find in Page does not reset after it is closed [r=mfinkle]
This commit is contained in:
parent
7ca740a665
commit
9c9f3550cd
@ -460,7 +460,10 @@ var FindHelperUI = {
|
||||
set status(val) {
|
||||
if (val != this._status) {
|
||||
this._status = val;
|
||||
this._textbox.setAttribute("status", val);
|
||||
if (!val)
|
||||
this._textbox.removeAttribute("status");
|
||||
else
|
||||
this._textbox.setAttribute("status", val);
|
||||
this.updateCommands(this._textbox.value);
|
||||
}
|
||||
},
|
||||
@ -476,6 +479,11 @@ var FindHelperUI = {
|
||||
messageManager.addMessageListener("FindAssist:Show", this);
|
||||
messageManager.addMessageListener("FindAssist:Hide", this);
|
||||
|
||||
// Listen for composition update, some VKB that does suggestions does not
|
||||
// update directly the content of the field but in this case we want to
|
||||
// search as soon as something is entered in the field
|
||||
this._textbox.addEventListener("text", this, false);
|
||||
|
||||
// Listen for events where form assistant should be closed
|
||||
document.getElementById("tabs").addEventListener("TabSelect", this, true);
|
||||
Elements.browsers.addEventListener("URLChanged", this, true);
|
||||
@ -507,6 +515,15 @@ var FindHelperUI = {
|
||||
if (aEvent.detail && aEvent.target == getBrowser())
|
||||
this.hide();
|
||||
break;
|
||||
|
||||
case "text":
|
||||
if (!this._open)
|
||||
return;
|
||||
|
||||
let evt = document.createEvent("Event");
|
||||
evt.initEvent("input", true, false);
|
||||
this._textbox.dispatchEvent(evt);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user