зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1441241. Reget a KeyboardEvent constructor on each findbar keypress, because the findbar lives across navigations. r=felipe
This commit is contained in:
Родитель
5588ef80d1
Коммит
895b88fb04
|
@ -209,10 +209,6 @@ function RemoteFinderListener(global) {
|
||||||
this._finder = new Finder(global.docShell);
|
this._finder = new Finder(global.docShell);
|
||||||
this._finder.addResultListener(this);
|
this._finder.addResultListener(this);
|
||||||
this._global = global;
|
this._global = global;
|
||||||
this.KeyboardEvent =
|
|
||||||
global.docShell
|
|
||||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
|
||||||
.getInterface(Ci.nsIDOMWindow).KeyboardEvent;
|
|
||||||
|
|
||||||
for (let msg of this.MESSAGES) {
|
for (let msg of this.MESSAGES) {
|
||||||
global.addMessageListener(msg, this);
|
global.addMessageListener(msg, this);
|
||||||
|
@ -318,7 +314,8 @@ RemoteFinderListener.prototype = {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "Finder:KeyPress":
|
case "Finder:KeyPress":
|
||||||
this._finder.keyPress(new this.KeyboardEvent("keypress", data));
|
var KeyboardEvent = this._finder._getWindow().KeyboardEvent;
|
||||||
|
this._finder.keyPress(new KeyboardEvent("keypress", data));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "Finder:MatchesCount":
|
case "Finder:MatchesCount":
|
||||||
|
|
Загрузка…
Ссылка в новой задаче