Commit 49417201 authored by Gijs Kruitbosch's avatar Gijs Kruitbosch
Browse files

Bug 1866100 - improve PromptUtils activeness handling, a=RyanVM

parent ec8eff91
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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();
};