react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

useMove: dragging and releasing outside iframe doesn't end drag

Open devongovett opened this issue 4 years ago โ€ข 1 comments

๐Ÿ› 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

devongovett avatar Dec 19 '20 00:12 devongovett

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 ;-)

cedeber avatar Jul 21 '22 12:07 cedeber