Open Bug 1894244 Opened 7 months ago Updated 2 months ago

Popup blocker is too strict when opening new windows

Categories

(Core :: DOM: Window and Location, defect, P3)

defect

Tracking

()

People

(Reporter: smaug, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: webcompat:platform-bug)

Example: scroll down https://www.forumforthefuture.org/ and try to subscribe to a new letter. The same issue happens on other sites too

I can reproduce. There is definitely a user activation when clicked which is not consumed (checked with navigator.userActivation.isActive). I haven't looked into it in detail yet, but my potential guesses at what is going wrong:

  • Popup blocker is just ignoring user activation/not trying to use it
  • User activation is too late (for the popup blocker)

In terms of user activation behavior in this example, Gecko vs Chromium from an observer:

Gecko:

  1. Click subscribe button
  2. User activation occurs
  3. New window is blocked
  4. Transient user activation remains until 5s timeout

Chromium:

  1. Click subscribe button
  2. User activation occurs
  3. New window is opened
  4. Transient user activation is gone as soon as new window is opened

NIing myself for further investigation as this seems like a common bug across various sites.

Flags: needinfo?(omedhurst)
Flags: needinfo?(omedhurst)
See Also: → 1863217
Flags: needinfo?(omedhurst)

(In reply to Oliver Medhurst [:canadahonk] from comment #1)

  • Popup blocker is just ignoring user activation/not trying to use it

Yes, I think it is the case. I did a quick check, the script calls window.open() in load event handler for script element. load event isn't in the allowed event list, so we push openBlocked state to the PopupState stack which will block popup without checking user activation.

I think perhaps we could make this case also fall back to check user activation, like what we does for openAbused state which is the default popup state.

Depends on: 1896672
Flags: needinfo?(omedhurst)

Why does this bloc bug 1917381, which seems to be a regression from something?

(In reply to Olli Pettay [:smaug][bugs@pettay.fi] from comment #3)

Why does this bloc bug 1917381, which seems to be a regression from something?

Right, this may not be right. "See also" should have been a better connection between this and bug 1917381.
I set that dependency while recalling a similar old bug 1601479.

No longer blocks: 1917381
You need to log in before you can comment on or make changes to this bug.