Re: [csswg-drafts] [selectors] Should :active apply to dialogs? (#7258)

Two points: 

1) regardless of what it's called, we need a pseudo-class to distinguish the currently active dialog, since multiple dialogs can be open and modal at the same time and there's no other way to distinguish the active one.

2) I don't believe the `:active` pseudo-class is defined in such a way as to prohibit it's use here. It is defined to mean 'being activated by the user' not 'has the mouse down on it'. The 'mouse down' trigger of activation state was an example only meant to have meaning on buttons (or other clickable elements, and for elements that don't have a clickable behavior, maybe `:active` on mouse down should only apply when there's a 'click' or 'mousedown' event handler). The fact that browsers get this wrong can be considered a bug, and I don't see why we can't tighten up the definition of 'being active' on specific elements, especially those that have a well defined 'active' state, like modal dialogs (tho that would belong in HTML). In fact, in @Loirooriol's example on iOS the dialog only has the active state when text is selected inside the dialog.

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


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

Received on Friday, 6 May 2022 18:03:54 UTC