diff --git a/content_scripts/mode_find.js b/content_scripts/mode_find.js index e7c182497..95942b4be 100644 --- a/content_scripts/mode_find.js +++ b/content_scripts/mode_find.js @@ -475,9 +475,10 @@ const highlight = (textNode, startIndex, length) => { const rect = range.getBoundingClientRect(); if (rect.top < 0 || rect.bottom > globalThis.innerHeight) { const screenHeight = globalThis.innerHeight; + const scrollBehavior = Settings.get("smoothScroll") ? "smooth" : "instant"; globalThis.scrollTo({ top: globalThis.scrollY + rect.top + rect.height / 2 - screenHeight / 2, - behavior: "smooth", + behavior: scrollBehavior, }); }