From b0410fc20c45227756a7bbdcff65e29eb0bc4d91 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 20:34:59 +0200 Subject: Merging upstream version 115.10.0esr. Signed-off-by: Daniel Baumann --- toolkit/components/prompts/src/PromptUtils.sys.mjs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'toolkit/components/prompts') 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(); }; -- cgit v1.2.3