bvaughn / react-resizable-panels

https://react-resizable-panels.vercel.app/
MIT License
3.58k stars 124 forks source link

Panels not collapsing completely at window edges #368

Open philippklodt opened 1 week ago

philippklodt commented 1 week ago

When trying to collapse a panel completely by dragging beyond the viewport/window, panels are sometimes not collapsed completely.

This happens when the panel-group's edge corresponds to the viewport edge (i.e. no margin).

I adapted one of the codesandbox samples and created a reproducible demo here: https://codesandbox.io/p/sandbox/react-resizable-panels-forked-r78ckq?file=%2Fsrc%2FApp.js%3A18%2C19-18%2C41

Adding some margin/padding around the panel-group can be used as a workaround, but this is sometimes undesired -- especially in my case where I was trying to implement resizable app-sidebars.

bvaughn commented 1 week ago

Makes sense.

Open to reviewing a PR if you'd like to suggest a fix!

philippklodt commented 1 week ago

Thanks for the quick reply, would love to help, but currently I can't say when I'll have time to look into it.