From b26336f2d2d5203d1acee00b069a829c0ebafd25 Mon Sep 17 00:00:00 2001 From: Scott González Date: Tue, 23 Feb 2010 02:57:33 +0000 Subject: Autocomplete: Reposition menu every time it opens. Fixes #5217 - Autocomplete in Dialog is posiitoned incorrectly in 1.8 RC2. --- ui/jquery.ui.autocomplete.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index 0d89d2047..5ae4e6222 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -120,12 +120,6 @@ $.widget( "ui.autocomplete", { .zIndex( this.element.zIndex() + 1 ) // workaround for jQuery bug #5781 http://dev.jquery.com/ticket/5781 .css({ top: 0, left: 0 }) - .position({ - my: "left top", - at: "left bottom", - of: this.element, - collision: "none" - }) .hide() .data( "menu" ); if ( $.fn.bgiframe ) { @@ -243,7 +237,12 @@ $.widget( "ui.autocomplete", { // TODO refresh should check if the active item is still in the dom, removing the need for a manual deactivate this.menu.deactivate(); this.menu.refresh(); - this.menu.element.show(); + this.menu.element.show().position({ + my: "left top", + at: "left bottom", + of: this.element, + collision: "none" + }); if ( ul.width() <= this.element.width() ) { ul.width( this.element.width() ); } -- cgit v1.2.3