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

[css-ui] State that pointer-events: none on frame prevents hit-testing its contents #7069

Open
Loirooriol opened this issue Feb 17, 2022 · 0 comments
Labels
css-ui-4 Current Work

Comments

@Loirooriol
Copy link
Contributor

https://drafts.csswg.org/css-ui-4/#valdef-pointer-events-none defines pointer-events: none as

Hit-testing acts as if the boxes generated by the element (see [CSS-DISPLAY-3]) were not there, effectively causing the element behind the pointer-events: none element to become the target of hit-testing based events instead.

This should make it explicit that if you have something like

<button>You can click me</button><br>
<iframe style="pointer-events: none" srcdoc="<button>You can't click me</button>"></iframe>

Then hit-testing will skip the button inside the iframe, even if it has pointer-events: auto (CSS properties don't inherit into iframes).

We already have interoperability among Blink, WebKit and Gecko. They behave as desired.

And this is important for inert: if the iframe becomes inert, it gets pointer-events: none per #6685 (comment), and this should prevent interaction with its contents, even if they aren't marked as inert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-ui-4 Current Work
Projects
None yet
Development

No branches or pull requests

1 participant