mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 10:33:33 +00:00
Bug 1866100 - improve PromptUtils activeness handling, a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D200165 Differential Revision: https://phabricator.services.mozilla.com/D206619
This commit is contained in:
parent
ec8eff915d
commit
4941720136
@ -76,6 +76,12 @@ export var EnableDelayHelper = function ({
|
||||
this.focusTarget.addEventListener("keydown", this, true);
|
||||
this.focusTarget.document.addEventListener("unload", this);
|
||||
|
||||
// If we're not part of the active window, don't even start the timer yet.
|
||||
let topWin = focusTarget.browsingContext.top.window;
|
||||
if (topWin != Services.focus.activeWindow) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.startOnFocusDelay();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user