react-resizable-panels icon indicating copy to clipboard operation
react-resizable-panels copied to clipboard

Issue with Cursor Icon Behavior in Nested Panels Example

Open benishouga opened this issue 1 year ago • 5 comments

Issue with Cursor Icon Behavior in Nested Panels Example Example Link: https://react-resizable-panels.vercel.app/examples/nested

Description:

I have noticed an issue with the cursor icon behavior in the nested panels example on your site.

  • Expected Behavior: When hovering over a PanelResizeHandle, the cursor icon should change to indicate the direction in which the panel can be resized.
  • Actual Behavior: After dragging vertically, when I try to drag a horizontally draggable PanelResizeHandle, the cursor icon still indicates vertical dragging instead of switching to horizontal dragging.

Steps to Reproduce:

  1. Go to the nested panels example.
  2. Drag a panel vertically.
  3. Hover over a horizontally draggable PanelResizeHandle.

Environment:

  • Windows 11 Home
  • Chrome 126.0.6478.185 (Official Build) (64-bit)

Visual Evidence:

I have prepared a video demonstrating this issue. Please review it for a better understanding.

https://github.com/user-attachments/assets/0a5aff38-f94c-4c93-9728-feb6883a09be

Thank you for looking into this issue.

benishouga avatar Jul 27 '24 05:07 benishouga

Hmm, this looks like maybe it could be related to pointer events in Chrome on Windows 11. (Like maybe there's an issue with the "pointerup" event or a ... no "pointermove" events afterward? Not sure.) Can't say I've seen this before, and I can't repro it on my end.

I'd be happy to review a PR if you have a change/proposal in mind.

bvaughn avatar Jul 29 '24 21:07 bvaughn

Hi @bvaughn

I don't understand your project codebase so I can't PR. But I know how to fix it 🤡

image

image

https://github.com/bvaughn/react-resizable-panels/commit/4576d366ebdfaf71a3ded9bee05a8538a9931063#diff-e2e20e9a5e034afc8f1bf711478e920714b1a5a11163f5c4dae8cf83915848fb

https://www.npmjs.com/package/react-resizable-panels/v/2.0.21

kaitoukid-1412 avatar Jul 31 '24 12:07 kaitoukid-1412

Not sure I understand, @kaitoukid-1412. Seems like you're suggesting a change that would potentially undo the fix for #340 though?

bvaughn avatar Jul 31 '24 20:07 bvaughn

It's up to you @bvaughn , i'm not a professional!

kaitoukid-1412 avatar Aug 01 '24 07:08 kaitoukid-1412

I'm facing the same problem. Any idea how to fix this?

mohitsainiknl avatar Aug 06 '24 18:08 mohitsainiknl

Would it possible to opt out the styling for the cursor? Aside from the current issue the styling seems like a sensible default, but in case of wanting to customise, the way styles are set makes it a bit hard to do it.

Thanks for the great library!

PabloCorso avatar Aug 15 '24 17:08 PabloCorso

Would it possible to opt out the styling for the cursor? Aside from the current issue the styling seems like a sensible default, but in case of wanting to customise, the way styles are set makes it a bit hard to do it.

Published in version 2.1.0


❤️ → ☕ givebrian.coffee

bvaughn avatar Aug 15 '24 19:08 bvaughn

Bugfix published in version 2.1.1


❤️ → ☕ givebrian.coffee

bvaughn avatar Aug 21 '24 13:08 bvaughn