-
-
Notifications
You must be signed in to change notification settings - Fork 796
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
sl-dropdown support for ESC and UP/DOWN broken in safari macOS #1177
Comments
I think the dropdown control should behave like the native menus on macOS. Open any macOS app, click a menu item from the top of the screen, and then you can do up/down and esc as expected. Esc usually causes popups to dismiss. Once a user clicks on a dropdown button, it seems totally intuitive to move the focus there. The user chose to click on something so clearly that is their focus. I'm noticing now on GitHub that this dropdown combo works as expected in Safari. What is difference between a dropdown and a select? For a reference I disagree with, go to apple.com and click the bag/cart icon at the top right on the nav bar. It pops up a bunch of options. Pressing See https://www.apple.com/iphone/compare/?modelList=iphone-14-pro,iphone-14-pro-max,iphone-14-plus. These dropdowns respond to both I think https://shoelace.style/components/select works as expected. |
This has been fixed in 12f6207.
This has been fixed in cedcd65. To make this work, I'm forcing focus on the trigger after it gets clicked. All browsers except Safari do this by default, so I don't expect any adverse effects from this. I did have to replace the |
Wow awesome! I've been trying to get Shoelace to work in Solid. Had lots of trouble - I'm not an experienced web dev. See #1207 - hoping you/someone can take this over and add to your getting started docs. Also noticed something weird with |
Describe the bug
On Safari on macOS there are two serious keyboard issues with the dropdown
esc
should cause the dropdown to close but is ignored.The expected behavior is what you see if you press
tab
to move the focus to a dropdown and then try the actions above. I'm pretty sure you get the correct behavior in Edge, Chrome, and Firefox.To Reproduce
Go to dropdown demo, click with mouse or trackpad to open a dropdown, and try to use keyboard to navigate
up
/down
or pressesc
to close.Browser / OS
The text was updated successfully, but these errors were encountered: