Fixes issue #464 by adding mouseout handler to document and calling mouseUp handler

This commit is contained in:
Ben Delarre 2014-09-12 16:01:19 -07:00
parent bcb16de02b
commit 2a8cb43d02

View File

@ -192,6 +192,8 @@
mouseupcaptured: function ( event ) { onMouseUpCaptured( _this, event ); }, mouseupcaptured: function ( event ) { onMouseUpCaptured( _this, event ); },
mousemove: function ( event ) { onMouseMove( _this, event ); }, mousemove: function ( event ) { onMouseMove( _this, event ); },
mousemovecaptured: function ( event ) { onMouseMoveCaptured( _this, event ); }, mousemovecaptured: function ( event ) { onMouseMoveCaptured( _this, event ); },
mouseoutdocument: function ( event ) { onMouseUp( _this, event ); },
touchenter: function ( event ) { onTouchEnter( _this, event ); }, touchenter: function ( event ) { onTouchEnter( _this, event ); },
touchleave: function ( event ) { onTouchLeave( _this, event ); }, touchleave: function ( event ) { onTouchLeave( _this, event ); },
@ -1049,6 +1051,10 @@
false false
); );
} }
// handle mouse out of document area
$.addEvent(document, "mouseout", delegate['mouseoutdocument']);
delegate.tracking = true; delegate.tracking = true;
} }
} }
@ -1074,6 +1080,9 @@
); );
} }
// handle mouse out of document area
$.removeEvent(document, "mouseout", delegate['mouseoutdocument']);
delegate.tracking = false; delegate.tracking = false;
} }
} }