mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-12-07 06:14:24 +00:00
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)
This commit is contained in:
parent
9a4eecdf85
commit
3af1f6c1ce
2
ui/jquery.ui.autocomplete.js
vendored
2
ui/jquery.ui.autocomplete.js
vendored
@ -429,7 +429,7 @@ $.widget("ui.menu", {
|
|||||||
elementHeight = this.element.height();
|
elementHeight = this.element.height();
|
||||||
if (offset < 0) {
|
if (offset < 0) {
|
||||||
this.element.attr("scrollTop", scroll + offset);
|
this.element.attr("scrollTop", scroll + offset);
|
||||||
} else if (offset > elementHeight) {
|
} else if (offset >= elementHeight) {
|
||||||
this.element.attr("scrollTop", scroll + offset - elementHeight + item.height());
|
this.element.attr("scrollTop", scroll + offset - elementHeight + item.height());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user