Skip to content
Permalink
Browse files

Autocomplete: Reposition menu every time it opens.

Fixes #5217 - Autocomplete in Dialog is posiitoned incorrectly in 1.8 RC2.
  • Loading branch information
scottgonzalez committed Feb 23, 2010
1 parent 3508531 commit b26336f2d2d5203d1acee00b069a829c0ebafd25
Showing with 6 additions and 7 deletions.
  1. +6 −7 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() );
}

0 comments on commit b26336f

Please sign in to comment.
You can’t perform that action at this time.