shadcn-ui / ui

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
https://ui.shadcn.com
MIT License
74.34k stars 4.59k forks source link

[bug]: Resizable, wrong resize cursor on hover over different resize direction after resize #4970

Open anthonyhoegberg opened 1 month ago

anthonyhoegberg commented 1 month ago

Describe the bug

When resizing using the resizable demo at Resizable Component When resizing and after not clicking on any objects, wrong resize cursor is displayed.

When lets say resizing horizontally or vertically, and then finish resizing. if we don't click on anything using the mouse and hover over a different axis of resizer we get the originally used resize cursor instead. So if we resized it vertically and after don't click on anything and hover over horizontal resize, we get vertical mouse resize icon.

Affected component/components

Resizable, ResizableHandle

How to reproduce

  1. Resize horizontally or vertically (don't click or select anything after resize)
  2. Hover over a different axis resize bar.
  3. Last resized axis mouse cursor is displayed on hover instead of current resize axis.

Codesandbox/StackBlitz link

https://ui.shadcn.com/docs/components/resizable

Logs

No response

System Info

Google Chrome

Before submitting

FKnorring commented 1 month ago

It seems like this can be fixed by updating the dependency on react-resizable-panels to atleast 2.1.1 where this bug was resolved.