Closed 4nnikaf closed 2 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
react-resizable-panels | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 15, 2024 2:39pm |
Thanks for the PR. I'm preparing a release in #339.
Fixing a problem described in #336
To solve the issue of click events passing through the hitAreaMargins to the elements behind them all we need to do is handle the events in the capture phase and prevent them from bubbling down to the children/panel content by calling
event.stopPropagation()
.However cancelling the mouse/touch events (for exmaple
mousedown
/touchstart
), does not cancel their pointer event counterparts (pointerdown
), like it does the other way around. So I also changed the event handlers to listen to the pointer events instead.