components icon indicating copy to clipboard operation
components copied to clipboard

fix(cdk/drag-drop): not stopping drag if page is blurred

Open crisbeto opened this issue 6 years ago • 3 comments

Currently the only way to stop a drag sequence is via a mouseup/touchend event or by destroying the instance, however if the page loses focus while dragging the events won't be dispatched anymore and user will have to click again to stop dragging. These changes add some extra code that listens for blur events on the window and stops dragging.

Fixes #17537.

crisbeto avatar Dec 01 '19 12:12 crisbeto

@jelbourn as I understand it, the page visibility API only emits when the user switches to a different tab or they minimize the window. I think the blur approach here is better, because it handles the same as the API, as well as when the user gets an alert.

crisbeto avatar Dec 04 '19 06:12 crisbeto

@jelbourn I think we kind of forgot about this PR. I don't think it's a big enough issue that we'd have to poll the community about it so can we keep it moving?

crisbeto avatar Jul 16 '20 21:07 crisbeto

I still think that the page blurring should be treated as an abort rather than a drop

jelbourn avatar Jul 20 '20 23:07 jelbourn