#9348 closed bug (notabug)
jquey.ui.mouse.js binding issue.
Reported by: | iamdenny | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.mouse | Version: | 1.10.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.mouse.js There is some code like this,
var mouseHandled = false; $( document ).mouseup( function() { mouseHandled = false; });
and when using widgets such as sortable, check the mouseHandled when mousedown event like this,
if( mouseHandled ) { return; }
It's fine so far.
But some people including me can use $(document).unbind('mouseup') for removing all the events. and then re-register them again. I think jquery-ui should provide a method for re-attach 'mouseup' event for using jquery-ui widgets again.
Thank you.
Change History (3)
comment:1 Changed 10 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
comment:2 Changed 10 years ago by
Ok. but it should provide the warning information to http://api.jqueryui.com/sortable/ about using mouseup event in default. because some people can be confused when removing mouseup event.
Thank you.
comment:3 Changed 10 years ago by
Ok. but it should provide the warning information to http://api.jqueryui.com/sortable/ about using mouseup event in default. because some people can be confused when removing mouseup event.
Thank you.
You should just not unbind events that you didn't bind in the first place. We're not going to provide a method to re-attach individual handlers for each widget.