From: Robson Braga Araujo Date: Tue, 10 Aug 2010 23:23:10 +0000 (+0800) Subject: Autocomplete: changed menu activated function to check if the offset is greater than... X-Git-Tag: 1.8.5~65 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3af1f6c1ce7aedc35d3852422c891f7a2a545a47;p=jquery-ui.git Autocomplete: changed menu activated function to check if the offset is greater than or equal the height. Fixed #5923 - autocomplete: Scrolling with the keyboard sometimes does not show the item (Chrome) --- diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index 4cd1b0548..940d41adf 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -429,7 +429,7 @@ $.widget("ui.menu", { elementHeight = this.element.height(); if (offset < 0) { this.element.attr("scrollTop", scroll + offset); - } else if (offset > elementHeight) { + } else if (offset >= elementHeight) { this.element.attr("scrollTop", scroll + offset - elementHeight + item.height()); } }