Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#5664 closed bug (notabug)

Using "trigger('mouseup')" to stop dragging returns "this.helper is null"

Reported by: Mustard Owned by:
Priority: minor Milestone:
Component: ui.core Version: 1.8.1
Keywords: Cc:
Blocked by: Blocking:

Description

If you try this code:

function mouseUp()
{
    if($('#tomove').offset().left > 400)
    {
        $('#tomove').trigger('mouseup');
    }
}

$(document).ready(
function()
{
    $('#tomove').draggable(
    {
        axis:   'x',
        drag: function(event, ui) 
        {
            mouseUp();
        }
    });
});

As soon as you reach the 400 px you will get an error, at least in FF 3.6 and IE8, like this one: this.helper is null

Is this a bug?

Change History (2)

comment:1 Changed 9 years ago by Jörn Zaefferer

Resolution: invalid
Status: newclosed

Triggering a mouseup event without the necessary event properties causes an error. Don't see an issue there - please use the forum to get help on whatever you're actually trying to do.

comment:2 Changed 7 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.