fix(cdk/drag-drop): not stopping drag if page is blurred
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.
@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.
@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?
I still think that the page blurring should be treated as an abort rather than a drop