unovue / shadcn-vue

Vue port of shadcn-ui
https://www.shadcn-vue.com/
MIT License
4.89k stars 280 forks source link

[Bug]: Dropdown menu on Firefox Mobile closes immediately #124

Closed MichaelSchmidle closed 11 months ago

MichaelSchmidle commented 1 year ago

Environment

Developement/Production OS: Windows 11 22h2 Build 22621.2428
Node version: 18.18.2
Package manager: pnpm@8.9.2
Radix Vue version: 0.4.1
Shadcn Vue version: 0.5.0
Vue version: 3.3.4
Nuxt version: 3.7.4
Nuxt mode: universal
Nuxt target: server
CSS framework: tailwindcss@3.3.3
Client OS: Android 13 / Windows 11 22h2 Build 22621.2428
Browser: Firefox 118.2.0 on Android 13 / Firefox 118.0.2 (64-bit) on Windows 11 in Responsive Design Mode (Ctrl+Shift+M)

Link to minimal reproduction

https://www.shadcn-vue.com/docs/components/dropdown-menu.html

Steps to reproduce

Use Firefox on Android or Firefox on Windows (in Responsive Design Mode, Ctrl+Shift+M), then browse to the official docs of the dropdown menu: https://www.shadcn-vue.com/docs/components/dropdown-menu.html

Click the dropdown menu trigger.

Describe the bug

The dropdown opens and immediately closes again. With Firefox on Android, pressing the trigger very long opens the dropdown menu for good—but users usually won't think of that.

In comparison, the Radix Vue dropdown menu (see https://www.radix-vue.com/components/dropdown-menu) works as expected and stays open after normally clicking it.

Expected behavior

The dropdown should stay open after a normal click on the trigger, just as the Radix Vue component.

Conext & Screenshots (if applicable)

No response

MichaelSchmidle commented 11 months ago

Not sure who fixed this or when, but the dropdown menu now behaves as expected. Thanks!

Just download the component again (and save any customizations you made to it beforehand):

npx shadcn-vue@latest add dropdown-menu