Description
Description
Calling event.preventDefault()
in the onSelect
handler of ActionList.Item
does not prevent closing the context menu. But it does work in onClick
.
Screen.Recording.2023-04-12.at.11.57.00.AM.mov
I want to delay closing the context menu in order to give a user a visual feedback when something gets copied in their clipboard
Screen.Recording.2023-04-12.at.11.59.47.AM.mov
It works when using the onClick
handler. But that makes it inaccessible to keyboard users.
I would expect that calling event.preventDefault()
in the onSelect
handler would prevent closing the menu so that I can do it manually when selecting the item with the mouse or they keyboard.
Steps to reproduce
https://stackblitz.com/edit/github-primer-action-test?file=App.tsx
Version
35.24.0
Browser
Chrome