react-spectrum
react-spectrum copied to clipboard
useMove: dragging and releasing outside iframe doesn't end drag
๐ Bug Report
When dragging outside an iframe, drag events stop being received. If you release your drag while outside the iframe, and then move your mouse back over it, the slider will continue to move as if you were pressing the mouse since it is unaware that the mouse was released.
๐ค Expected Behavior
Drag events should continue being received when dragging outside the iframe, just like when there is no iframe.
๐ Possible Solution
This is potentially fixed by not calling preventDefault on mouse down according to this: https://taye.me/blog/tips/2015/11/16/mouse-drag-outside-iframe/. Not sure what other issues this might introduce though. Investigate and find out. It was originally added here: https://github.com/adobe/react-spectrum/pull/1106#issuecomment-702728778.
๐งข Your Company/Team
RSP
I have the same kind of bug, although related to Firefox only. When you drag a slider thumb and release the mouse above a disabled button, then the slider will also continue to move. It's maybe fortunate that it works on Chrome then ;-)