Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should <a target="_blank"> and window.open consume the transient activation? #10108

Closed
EdgarChen opened this issue Jan 29, 2024 · 3 comments · Fixed by #10547
Closed

Should <a target="_blank"> and window.open consume the transient activation? #10108

EdgarChen opened this issue Jan 29, 2024 · 3 comments · Fixed by #10547

Comments

@EdgarChen
Copy link
Member

EdgarChen commented Jan 29, 2024

What is the issue with the HTML Standard?

https://html.spec.whatwg.org/multipage/document-sequences.html#the-rules-for-choosing-a-navigable checks for the transient activation without consuming it. Chromium seems to consume the transient activation in both <a target="_blank"> and window.open cases per result of test. Gecko only consumes the activation in window.open case. Webkit doesn't consume the activation in either case.

@domenic
Copy link
Member

domenic commented Jan 30, 2024

This seems like a good idea. Maybe @mustaqahmed can recall why we didn't specify this in the first place. Was it just because it wasn't interoperable, so we weren't sure everyone would be willing to do it?

@mustaqahmed
Copy link
Contributor

Mentioning consumption in the spec makes sense to me.

... why we didn't specify this in the first place. Was it just because it wasn't interoperable, so we weren't sure everyone would be willing to do it?

That matches my understanding: popup blockers came into existence "organically" w/o a spec, and each browser had a slightly different implementation that just worked.

I believe another blocker for a possible consensus here is that popup blockers use few other signals (I mean "other than just user activation") like how allowed-sites are handled and the number or the frequency of popup requests. The list of signals used by each browser seems different (as far as I could sense from my 7-yr old experiment). Cataloging all signals used by each browsers could be a good first step if we expect to standardize popup blockers.

@CanadaHonk
Copy link
Member

I'll likely start a PR for this soon if that sounds good?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

6 participants
@zcorpan @domenic @EdgarChen @mustaqahmed @CanadaHonk and others