4

I can't get the dragleave or dragexit events to fire when a drag leaves the window (Firefox4). In Chrome and Safari, this works as expected.... you get a dragleave event when the drag leaves the window.

Is this expected behavior? Anyone know a workaround?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Seth
  • 2,712
  • 3
  • 25
  • 41
  • What are your listeners on? `document` or `window`? If your listeners are on `window`, it *shouldn't* fire those events. – Eli Grey May 11 '11 at 02:21
  • My listeners are on a fixed position div that fills the document (position: fixed; left: 0; right: 0; top: 0; bottom: 0) – Seth May 11 '11 at 19:20
  • I filed a bug: https://bugzilla.mozilla.org/show_bug.cgi?id=656164 – Seth Aug 11 '11 at 15:34
  • I have a similar case with a full-screen overlay (for user education). Firefox will not send any dragleave/dragexit events to window, document, or the overlay element. The only workaround I have at this point is a timeout after the last mousemove. – funwhilelost Oct 07 '11 at 00:27
  • I've seconded your bug report. Annoying. – Rudie Nov 15 '11 at 15:27
  • http://stackoverflow.com/questions/10253663/how-to-detect-the-dragleave-event-in-firefox-when-dragging-outside-the-window – worenga Apr 23 '12 at 00:25

1 Answers1

0

So, to sum up the comments: This is a browser bug, it is still present apparently, and there is a jQuery-based workaround.

Adrian Heine
  • 4,051
  • 2
  • 30
  • 43