Opened 7 years ago

Closed 7 years ago

#8919 closed bug (notabug)

Element drifts across the page when positioning is applied multiple times

Reported by: mnbayazit Owned by:
Priority: minor Milestone: 1.10.0
Component: ui.position Version: 1.9.2
Keywords: Cc:
Blocked by: Blocking:

Description

#[demo](http://jsfiddle.net/mnbayazit/MLJD2/1/)

sample code

    $('body').on('click', '.link', function() {
        $('#ode_options').position({
            of: this,
            my: 'left top',
            at: 'left bottom',
    
        }).show();
        return false;
    });
    
    $(document).on('click', function(e) {
        if (!$('#ode_options,td>a').has(e.target).length) {
            $('#ode_options').hide();
        }
    });
    
    
    // simulate some clicks to demonstrate the problem
    $('a:first').trigger('click');
    setInterval(function() {
      $('body').trigger('click');
        setTimeout(function() {
            $('a:first').trigger('click');
        }, 500);
    }, 1000);    

Even though I call the exact same positioning code over and over again, the popup drifts across the page.

Change History (1)

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

Resolution: notabug
Status: newclosed

From the documentation:

Note: jQuery UI does not support positioning hidden elements.

Note: See TracTickets for help on using tickets.