|
@@ -135,7 +135,16 @@
|
|
|
.siblings().removeClass('active');
|
|
|
activeItem = suggestionsOuter.find('.suggest-item.active');
|
|
|
if (activeItem.length) {
|
|
|
- activeItem[0].scrollIntoView();
|
|
|
+ if(activeItem[0].scrollIntoViewIfNeeded) {
|
|
|
+ activeItem[0].scrollIntoViewIfNeeded(false);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ activeItem[0].scrollIntoView({
|
|
|
+ behavior: "auto",
|
|
|
+ block: "start",
|
|
|
+ inline: "start"
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return false;
|
|
@@ -149,7 +158,16 @@
|
|
|
.siblings().removeClass('active');
|
|
|
activeItem = suggestionsOuter.find('.suggest-item.active');
|
|
|
if (activeItem.length) {
|
|
|
- activeItem[0].scrollIntoView();
|
|
|
+ if(activeItem[0].scrollIntoViewIfNeeded) {
|
|
|
+ activeItem[0].scrollIntoViewIfNeeded(false);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ activeItem[0].scrollIntoView({
|
|
|
+ behavior: "auto",
|
|
|
+ block: "end",
|
|
|
+ inline: "end"
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return false;
|