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

Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-ui] State that `pointer-events: none` on frame prevents hit-testing its contents ==
https://drafts.csswg.org/css-ui-4/#valdef-pointer-events-none defines `pointer-events: none` as

> [Hit-testing](https://drafts.csswg.org/css-ui-4/#hit-testing) acts as if the boxes generated by the element (see [[CSS-DISPLAY-3]](https://drafts.csswg.org/css-ui-4/#biblio-css-display-3)) were not there, effectively causing the element behind the [pointer-events: none](https://drafts.csswg.org/css-ui-4/#propdef-pointer-events) element to become the target of hit-testing based events instead.

This should make it explicit that if you have something like

```html
<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 https://github.com/w3c/csswg-drafts/issues/6685#issuecomment-930305697, and this should prevent interaction with its contents, even if they aren't marked as inert.



Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7069 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 17 February 2022 22:53:34 UTC