diff options
Diffstat (limited to 'themes/default/js/ui/jquery.ui.autocomplete.js')
-rw-r--r-- | themes/default/js/ui/jquery.ui.autocomplete.js | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/themes/default/js/ui/jquery.ui.autocomplete.js b/themes/default/js/ui/jquery.ui.autocomplete.js index 718bfe5b9..edf79767f 100644 --- a/themes/default/js/ui/jquery.ui.autocomplete.js +++ b/themes/default/js/ui/jquery.ui.autocomplete.js @@ -1,5 +1,5 @@ /* - * jQuery UI Autocomplete 1.8.10 + * jQuery UI Autocomplete 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. @@ -20,6 +20,7 @@ var requestIndex = 0; $.widget( "ui.autocomplete", { options: { appendTo: "body", + autoFocus: false, delay: 300, minLength: 1, position: { @@ -47,7 +48,7 @@ $.widget( "ui.autocomplete", { "aria-haspopup": "true" }) .bind( "keydown.autocomplete", function( event ) { - if ( self.options.disabled || self.element.attr( "readonly" ) ) { + if ( self.options.disabled || self.element.propAttr( "readOnly" ) ) { return; } @@ -365,6 +366,10 @@ $.widget( "ui.autocomplete", { ul.position( $.extend({ of: this.element }, this.options.position )); + + if ( this.options.autoFocus ) { + this.menu.next( new $.Event("mouseover") ); + } }, _resizeMenu: function() { @@ -485,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) @@ -596,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 ) { |