Search and Top Navigation
#9348 closed bug (notabug)
Opened May 31, 2013 06:19AM UTC
Closed May 31, 2013 12:10PM UTC
Last modified June 01, 2013 08:52AM UTC
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,
#!js var mouseHandled = false; $( document ).mouseup( function() { mouseHandled = false; });
and when using widgets such as sortable, check the mouseHandled when mousedown event like this,
#!js 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.
Attachments (0)
Change History (3)
Changed May 31, 2013 12:10PM UTC by comment:1
resolution: | → notabug |
---|---|
status: | new → closed |
Changed June 01, 2013 08:51AM UTC by comment:2
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.
Changed June 01, 2013 08:52AM UTC by comment:3
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.