mirror of
https://github.com/devbridge/jQuery-Autocomplete.git
synced 2024-11-22 12:55:12 +00:00
Merge pull request #245 from balvig/delta
Use height of items to compute heightDelta
This commit is contained in:
commit
505485e717
@ -851,16 +851,17 @@
|
|||||||
|
|
||||||
adjustScroll: function (index) {
|
adjustScroll: function (index) {
|
||||||
var that = this,
|
var that = this,
|
||||||
activeItem = that.activate(index),
|
activeItem = that.activate(index)
|
||||||
offsetTop,
|
|
||||||
upperBound,
|
|
||||||
lowerBound,
|
|
||||||
heightDelta = 25;
|
|
||||||
|
|
||||||
if (!activeItem) {
|
if (!activeItem) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var offsetTop,
|
||||||
|
upperBound,
|
||||||
|
lowerBound,
|
||||||
|
heightDelta = $(activeItem).outerHeight();
|
||||||
|
|
||||||
offsetTop = activeItem.offsetTop;
|
offsetTop = activeItem.offsetTop;
|
||||||
upperBound = $(that.suggestionsContainer).scrollTop();
|
upperBound = $(that.suggestionsContainer).scrollTop();
|
||||||
lowerBound = upperBound + that.options.maxHeight - heightDelta;
|
lowerBound = upperBound + that.options.maxHeight - heightDelta;
|
||||||
|
Loading…
Reference in New Issue
Block a user