Skip to content

Maintain focus on trigger when Menu is open #4458

Answered by ritz078
ritz078 asked this question in Q&A
Discussion options

You must be logged in to vote

Yes I think it's the popover that has focus. I realised that I can actually fake this behaviour by pretending that the menu trigger button is focused using CSS. So even though it's not focused I can style it to look like it does and add interactions using JS.

Kapture.2023-05-02.at.01.22.05.mp4

Thanks a lot for your help. I think I have achieved the most of what I wanted using existing APIs of react-aria.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@ritz078
Comment options

@snowystinger
Comment options

@ritz078
Comment options

Answer selected by snowystinger
@snowystinger
Comment options

@ritz078
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants