DropdownMenu Item triggered on Enter (when opening the dropdown) #1337
-
Hi, I'm trying to compose DropdownMenuItem with DialogTrigger. But the DialogTrigger get's triggered when opening the Dropdown with the 'Enter' key. Minimal Example: <DropdownMenu.Root>
<DropdownMenu.Trigger>Open</DropdownMenu.Trigger>
<DropdownMenu.Content>
<DropdownMenu.Item asChild>
<button onClick={() => console.log("1")}>Click Me 1</button>
</DropdownMenu.Item>
<DropdownMenu.Item asChild>
<button onClick={() => console.log("2")}>Click Me 2</button>
</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu.Root> When hitten 'Enter' on the dropdown trigger, the console printout is "1" which is unexpected. As a side-note, I also see a console error: Hope someone can help, thanks in advance! 😄 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
this issue comment might help #1268 (comment) |
Beta Was this translation helpful? Give feedback.
this issue comment might help #1268 (comment)