summaryrefslogtreecommitdiffstats
path: root/toolkit/components/prompts/src/PromptUtils.sys.mjs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:42:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:42:18 +0000
commiteee4e46aea64fbf882cb9dda2088a8a1082ed208 (patch)
treefb11dec5c7d392b06a963ceeb472e752b063b3ba /toolkit/components/prompts/src/PromptUtils.sys.mjs
parentReleasing progress-linux version 115.9.1esr-1~progress7.99u1. (diff)
downloadfirefox-esr-eee4e46aea64fbf882cb9dda2088a8a1082ed208.tar.xz
firefox-esr-eee4e46aea64fbf882cb9dda2088a8a1082ed208.zip
Merging upstream version 115.10.0esr.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--toolkit/components/prompts/src/PromptUtils.sys.mjs6
1 files changed, 6 insertions, 0 deletions
diff --git a/toolkit/components/prompts/src/PromptUtils.sys.mjs b/toolkit/components/prompts/src/PromptUtils.sys.mjs
index 7a15802b84..8c1b0ff992 100644
--- a/toolkit/components/prompts/src/PromptUtils.sys.mjs
+++ b/toolkit/components/prompts/src/PromptUtils.sys.mjs
@@ -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();
};