aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.autocomplete.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2010-02-23 02:57:33 +0000
committerScott González <scott.gonzalez@gmail.com>2010-02-23 02:57:33 +0000
commitb26336f2d2d5203d1acee00b069a829c0ebafd25 (patch)
treec1b700e8e8006ed1bba8ce95ac415a717b5aa80f /ui/jquery.ui.autocomplete.js
parent350853179fc873a2afe6e8d2338a6b9e35303c9c (diff)
downloadjquery-ui-b26336f2d2d5203d1acee00b069a829c0ebafd25.tar.gz
jquery-ui-b26336f2d2d5203d1acee00b069a829c0ebafd25.zip
Autocomplete: Reposition menu every time it opens.
Fixes #5217 - Autocomplete in Dialog is posiitoned incorrectly in 1.8 RC2.
Diffstat (limited to 'ui/jquery.ui.autocomplete.js')
-rw-r--r--ui/jquery.ui.autocomplete.js13
1 files changed, 6 insertions, 7 deletions
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() );
}