зеркало из https://github.com/mozilla/gecko-dev.git
Bug 967982: harden _setFindCloseTimeout to only start a timer when the findbar is hidden. r=evilpie,Unfocused
This commit is contained in:
Родитель
e0a06f0abb
Коммит
502c86582b
|
@ -123,8 +123,7 @@
|
||||||
<handler event="compositionend"><![CDATA[
|
<handler event="compositionend"><![CDATA[
|
||||||
let findbar = this.findbar;
|
let findbar = this.findbar;
|
||||||
findbar._isIMEComposing = false;
|
findbar._isIMEComposing = false;
|
||||||
if (findbar._findMode != findbar.FIND_NORMAL &&
|
if (findbar._findMode != findbar.FIND_NORMAL)
|
||||||
!findbar.hidden)
|
|
||||||
findbar._setFindCloseTimeout();
|
findbar._setFindCloseTimeout();
|
||||||
]]></handler>
|
]]></handler>
|
||||||
|
|
||||||
|
@ -410,17 +409,18 @@
|
||||||
if (this._quickFindTimeout)
|
if (this._quickFindTimeout)
|
||||||
clearTimeout(this._quickFindTimeout);
|
clearTimeout(this._quickFindTimeout);
|
||||||
|
|
||||||
// Don't close the find toolbar while IME is composing.
|
// Don't close the find toolbar while IME is composing OR when the
|
||||||
if (this._isIMEComposing) {
|
// findbar is already hidden.
|
||||||
|
if (this._isIMEComposing || this.hidden) {
|
||||||
this._quickFindTimeout = null;
|
this._quickFindTimeout = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._quickFindTimeout =
|
this._quickFindTimeout = setTimeout(() => {
|
||||||
setTimeout(function(aSelf) {
|
if (this._findMode != this.FIND_NORMAL)
|
||||||
if (aSelf._findMode != aSelf.FIND_NORMAL)
|
this.close();
|
||||||
aSelf.close();
|
this._quickFindTimeout = null;
|
||||||
}, this._quickFindTimeoutLength, this);
|
}, this._quickFindTimeoutLength);
|
||||||
]]></body>
|
]]></body>
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
|
@ -1127,7 +1127,7 @@
|
||||||
else
|
else
|
||||||
this._findFailedString = null;
|
this._findFailedString = null;
|
||||||
|
|
||||||
if (this._findMode != this.FIND_NORMAL && !this.hidden)
|
if (this._findMode != this.FIND_NORMAL)
|
||||||
this._setFindCloseTimeout();
|
this._setFindCloseTimeout();
|
||||||
]]></body>
|
]]></body>
|
||||||
</method>
|
</method>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче