-
Notifications
You must be signed in to change notification settings - Fork 13
Focusout for Dropdown, Menubar and ContextMenu #22
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
Conversation
Maybe we need something similar for menubar |
One main drawback for this is, to make accessibility work with this. I am not sure if we should go ahead with funtionality or accessibility. Until we find the sweet spot |
When I serve this branch locally, I'm not able to interact with any of the buttons in the context menu dropdown. I'm guessing because when you click the button, the div loses focus? Screen.Recording.2025-06-02.at.4.17.41.PM.mov |
This reverts commit a8e41a2.
Thank you @ealmloff for pointing it out. Looks like inert was making it not work for some reason. But we can leave it commented for now. Should be okay now. |
It looks like onfocusout has limited support in browsers, so we should probably avoid using it in the component library. I pushed some changes with a similar approach using the onblur on each focusable element, which seems to work with the new keyboard support. Let me know if I missed anything from your original implementation. It looks like animations are working as well. Is this ready to merge? |
Thank you @ealmloff for picking it up and cleaning, i got abit busy with something else so couldnt clean things up for merge. Looks good to me its ready to merge. |
Preview available at https://dioxuslabs.github.io/components/pr-preview/pr-22/ |
Attempt for #18 & #28