mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Interaction: Fixed unbinding of mousemove and mouseup event handlers.
This commit is contained in:
parent
ed463ab80c
commit
726d3f67c2
18
ui/jquery.ui.interaction.js
vendored
18
ui/jquery.ui.interaction.js
vendored
@ -53,15 +53,21 @@ interaction.hooks.mouse = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handle: function( widget ) {
|
handle: function( widget ) {
|
||||||
widget._bind( widget.document, {
|
function mousemove( event ) {
|
||||||
"mousemove": function( event ) {
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
widget._interactionMove( event );
|
widget._interactionMove( event );
|
||||||
},
|
|
||||||
"mouseup": function( event ) {
|
|
||||||
widget._interactionStop( event );
|
|
||||||
widget.document.unbind( "mousemove mouseup" );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function mouseup( event ) {
|
||||||
|
widget._interactionStop( event );
|
||||||
|
widget.document
|
||||||
|
.unbind( "mousemove", mousemove )
|
||||||
|
.unbind( "mouseup", mouseup );
|
||||||
|
}
|
||||||
|
|
||||||
|
widget._bind( widget.document, {
|
||||||
|
"mousemove": mousemove,
|
||||||
|
"mouseup": mouseup
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user