corvudev / corvu

🐦‍⬛ Unstyled, accessible and customizable UI primitives for SolidJS

Home Page:https://corvu.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Drawer moves with after right click

bitobeats opened this issue · comments

Bug description

When right clicking the Drawer component and then dismissing the system menu, the component acts as if I was dragging it.

Reproduction Link

https://stackblitz.com/edit/corvu-mtkurb?file=src%2FApp.tsx

Reproduction Steps

  1. Open the drawer
  2. Right click anywhere inside the drawer area
  3. Left click inside the drawer area to dismiss the system menu that appears
  4. Move the mouse

Expected behavior

I expected that moving the mouse in step 5 wouldn't move the drawer around.

Additional context

PS. Thank you for the lib! You are doing a great job for the community!!

Thanks a lot for reporting this bug! I'm currently busy with a small refactor of corvu (#17) and will fix this bug afterwards :)
Shouldn't take too long!

Thank you a lot! =)

On another topic: I realized the there's some css missing in the non-tailwind example of the Drawer. I'll try to find some time to send a PR correcting it during this week if I have some time, ok?

Sure! Thanks :)

Fixed in 1f759e3 and released as @corvu/drawer@0.1.0

Thank you for this! I just tested it and it seems to be working properly =].
Also, I loved the idea of splitting components in their own packages!

Just something I've noted: the "as" prop of the <Drawer.Trigger> used to accept components but now it only accepts html tags.
By what I tested, it still works with components. Maybe it's just a type thing?

Though it would be better asking you if this was intentional before investigating

It should still accept components 🙈 I reworked the dynamic type system and some imperfections came to light. I need to investigate this week. I'll update you!