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:
@@ -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'
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user