Fixed autocomplete position near page bottom
This commit is contained in:
parent
06180f5b50
commit
19e7fa94f7
1 changed files with 8 additions and 2 deletions
|
@ -234,9 +234,15 @@ App.Controls.AutoCompleteInput = function($input) {
|
|||
options.onRender($list);
|
||||
}
|
||||
refreshActiveResult();
|
||||
|
||||
var x = $input.offset().left;
|
||||
var y = $input.offset().top + $input.outerHeight() - 2;
|
||||
if (y + $div.height() > window.innerHeight) {
|
||||
y = $input.offset().top - $div.height();
|
||||
}
|
||||
$div.css({
|
||||
left: ($input.offset().left) + 'px',
|
||||
top: ($input.offset().top + $input.outerHeight() - 2) + 'px',
|
||||
left: x + 'px',
|
||||
top: y + 'px',
|
||||
});
|
||||
$div.show();
|
||||
monitorInputHiding();
|
||||
|
|
Loading…
Reference in a new issue