1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-11-06 08:39:09 +02:00

Updated scrolling logic (#343)

This commit is contained in:
Tim Voronov
2019-08-01 20:27:26 -04:00
committed by GitHub
parent 27a74cd398
commit 2ba68ebf00
2 changed files with 8 additions and 0 deletions

View File

@@ -42,6 +42,8 @@ const (
if (!isInViewport(el)) {
el.scrollIntoView({
block: 'center',
inline: 'center',
behavior: 'instant'
});
}
@@ -81,6 +83,8 @@ func ScrollIntoViewBySelector(selector string) string {
if (!isInViewport(el)) {
el.scrollIntoView({
block: 'center',
inline: 'center',
behavior: 'instant'
});
}