Closing DropdownMenu by clicking outside highlights first item on a touch device
Describe the bug If on a touch device (chrome emulation also works) close DropdownMenu by clicking outside, first item gets highlighted.
See official example from docs:
https://kobalte.dev/docs/core/components/dropdown-menu
To Reproduce Steps to reproduce the behavior:
- Open official example on a touch device
- Click on the trigger 'Git settings'
- Click outside to close the Dropdown
- While menu content is fading out, you can clearly see that first item ("Commit") got highlighted.
Expected behavior It should not get highlighted, as it works on a desktop.
Desktop (please complete the following information):
- OS: Linux
- Browser: Brave (mobile emulation), Chromium (mobile emulation)
Smartphone (please complete the following information):
- Device: Samsung
- OS: Android
- Browser Brave Mobile
Indeed; curiously enough though, this is only applicable to dropdown menu. Other components like menubar don't seem to have the same behaviour.
Similarly, this only applies to the root dropdown menu. If a sub-menu is open, then neither the first item of the sub-menu, nor the parent menu are highlighted.