-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Change light dismiss to use click events #11536
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
base: main
Are you sure you want to change the base?
Conversation
This PR replaces the existing pointerdown and pointerup listening and tracking with algorithms which use a click event. The click event is going to be used by the pointerevents spec here: w3c/pointerevents#460 Using click events instead of doing click detection with pointerdown and pointerup fixes a number of issues which are detailed here: w3c/pointerevents#542 Fixes whatwg#10905
foolip
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Editorially looks good and makes a lot of things simpler. I just have opinions about types :)
|
@annevk @smaug---- do yall have any feedback on this? |
|
I'm likely missing something here, but since mousedown triggers select's popup to be shown, aren't there cases when just relying on click here then immediately dismisses it. |
Good catch! I'm working on a fix for this, I'll try putting it in this spec PR after I get something that works well. |
|
Here is the aforementioned fix for the immediate light dismiss: #12008 |
|
If I understand correctly, this PR will change user-facing behavior from: (the arrows indicate a to
If this isn’t intentional, I can suggest fixes. demo: https://codepen.io/sb3nder/pen/qEZpXqL Regarding #12008, I wonder if it would be better to apply the same behavior to non‑select popovers. I can suggest a small change that wouldn’t require a flag. |
|
Thanks for the images, but I'm having a hard time understanding the behavior difference. The change is released in chrome canary with experimental web platform features enabled: chrome://flags/#enable-experimental-web-platform-features Do you think you could test it out and share a video? Or give a list of steps I can read to repro the change in behavior? |
|
Ah good point I messed this up in the process of rewriting the chromium patch several times, I'll update this and the pointerevents spec PR soon |
|
Ok it should have substantially more detail now, please take a look. I also updated the pointerevents spec PR accordingly |
| </ol> | ||
| </li> | ||
| <li><p>If <var>pointerDownPopover</var> is the same as <var>pointerUpPopover</var>, then run | ||
| <span data-x="hide-all-popovers-until">hide all popovers until</span> given <var>ancestor</var>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <span data-x="hide-all-popovers-until">hide all popovers until</span> given <var>ancestor</var>, | |
| <span data-x="hide-all-popovers-until">hide all popovers until</span> given <var>pointerDownPopover</var>, |
|
Looks good to me!
|



This PR replaces the existing pointerdown and pointerup listening and tracking with algorithms which use a click event. The click event is going to be used by the pointerevents spec here:
w3c/pointerevents#460
Using click events instead of doing click detection with pointerdown and pointerup fixes a number of issues which are detailed here: w3c/pointerevents#542
Fixes #10905
(See WHATWG Working Mode: Changes for more details.)
/infrastructure.html ( diff )
/interactive-elements.html ( diff )
/popover.html ( diff )