Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#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.

Ref : http://stackoverflow.com/questions/16848910/jquery-sortable-is-not-working-after-document-unbindmousemove

Thank you.

Change History (3)

comment:1 Changed 10 years ago by Scott González

Resolution: notabug
Status: newclosed

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.

comment:2 Changed 10 years ago by iamdenny

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 iamdenny

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.

Note: See TracTickets for help on using tickets.