huntabyte / shadcn-svelte

shadcn/ui, but for Svelte. ✨
https://shadcn-svelte.com
MIT License
4.13k stars 259 forks source link

Menubar click drag release not implemented #1069

Open iojanis opened 4 weeks ago

iojanis commented 4 weeks ago

Describe the bug

With shadcn (react or vue) menubars, rightclick menus etc. would appear on click and would register the mouse release as the next click. This enables macOS style click->drag->release functionality. This svelte port only registers mouse up events.

Reproduction

Menubar example. Click on a Menuitem and drag the mouse. The context window wont show up.

Logs

No response

System Info

...

Severity

annoyance

AdrianGonz97 commented 4 weeks ago

Thanks for raising an issue. It took me a bit to understand the issue, but I think I got there.


Here's a quick demo of how it works in shadcn for react:

Starting on a menu trigger, hold down left click and move to begin expanding all of the menus. On release, the selected menu option will trigger. img