Skip to main content

Search and Top Navigation

#8919 closed bug (notabug)

Opened December 18, 2012 12:29AM UTC

Closed December 18, 2012 12:45AM UTC

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.

Attachments (0)
Change History (1)

Changed December 18, 2012 12:45AM UTC by scottgonzalez comment:1

resolution: → notabug
status: newclosed

From the documentation:

Note: jQuery UI does not support positioning hidden elements.