Re: [csswg-drafts] Add an `::interest-button` pseudo element to interest invokers (#12437)

> I assume bubbling in the comment is really about propagation in general, not only about bubble phase of the event dispatch. FWIW, I don't see the test testing pointerevents (except click), but mouse and touch.

Indeed yes, thanks. I mean all propagation outside the event. I've updated the test page to include capture and bubble phases, as well as more pointerevents. The conclusions don't change AFAICT. There's something odd about the `gotpointercapture` and `lostpointercapture` events, at least in Chrome, but otherwise most of the conclusions above hold, I think.

> > not bubble any pointer events up from the pseudo element
> 
> that doesn't seem viable. We do want *move events to propagate in general.

Yeah, I was curious about that. So you'd say all of the movement events keep firing, but not the discrete down/up/click type events? That does seem like it'll remove the footguns, which are mostly about things like `click`.

> We should not add any special casing for ::interest-button, I think, but have some consistent behavior among pseudo elements, or at least make it configurable. Could there be some CSS property which affects which events a pseudo element "eats". (that way we could possibly explain the behavior video element has, assuming we define pseudo elements for the controls)

Interesting idea! If there were such a thing, then the default could be to "eat" the events (to have footgun-free default behavior), but then the developer could override in case they needed that. The bikeshedding seems tough for such a feature: what's it called, how do you specify which events get "eaten", does it work on regular elements also, etc. It might be a bit of a dangerous property also, breaking event delegation code, for example. I'm wondering if perhaps the initial behavior for `::interest-button` could be to "eat" events, and then that can get explained/overridden later with a property, if use cases arise? That might help with the bikeshedding.

-- 
GitHub Notification of comment by mfreed7
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12437#issuecomment-3362136445 using your GitHub account


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

Received on Thursday, 2 October 2025 16:46:24 UTC