summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-05-11 08:40:16 -0400
committerScott González <scott.gonzalez@gmail.com>2011-05-11 08:40:16 -0400
commit36110e07d471ee0d59d9ac5b5077deda7005d155 (patch)
treef8609c5f140375928c0e10b87806a4f096e8b2ef /ui
parent38af07ec4e916bc5fe1268b9878a21801368a78d (diff)
downloadjquery-ui-36110e07d471ee0d59d9ac5b5077deda7005d155.tar.gz
jquery-ui-36110e07d471ee0d59d9ac5b5077deda7005d155.zip
Autocomplete: Use appropriate methods for getting scroll values for .prop()/.attr() compat. Fixes #7354 - Autocomplete: Scrollable results don't visually update with jQuery 1.6.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.autocomplete.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js
index dfe3fa3f3..62fb782df 100644
--- a/ui/jquery.ui.autocomplete.js
+++ b/ui/jquery.ui.autocomplete.js
@@ -490,12 +490,12 @@ $.widget("ui.menu", {
this.deactivate();
if (this.hasScroll()) {
var offset = item.offset().top - this.element.offset().top,
- scroll = this.element.attr("scrollTop"),
+ scroll = this.element.scrollTop(),
elementHeight = this.element.height();
if (offset < 0) {
- this.element.attr("scrollTop", scroll + offset);
+ this.element.scrollTop( scroll + offset);
} else if (offset >= elementHeight) {
- this.element.attr("scrollTop", scroll + offset - elementHeight + item.height());
+ this.element.scrollTop( scroll + offset - elementHeight + item.height());
}
}
this.active = item.eq(0)
@@ -601,7 +601,7 @@ $.widget("ui.menu", {
},
hasScroll: function() {
- return this.element.height() < this.element.attr("scrollHeight");
+ return this.element.height() < this.element[ $.fn.prop ? "prop" : "attr" ]("scrollHeight");
},
select: function( event ) {