✨ Improve scroll-to-result functionality with smoother scrolling and fallback adjustments
This commit is contained in:
@@ -660,7 +660,9 @@ function scrollToResult() {
|
|||||||
// Fallback: scroll container to approximate position
|
// Fallback: scroll container to approximate position
|
||||||
const container = document.querySelector('.scroller, .lines-container');
|
const container = document.querySelector('.scroller, .lines-container');
|
||||||
if (container) {
|
if (container) {
|
||||||
const estimatedScroll = (lineIndex / displayLines.value.length) * (container.scrollHeight - container.clientHeight);
|
const estimatedScroll =
|
||||||
|
(lineIndex / displayLines.value.length) *
|
||||||
|
(container.scrollHeight - container.clientHeight);
|
||||||
container.scrollTop = estimatedScroll;
|
container.scrollTop = estimatedScroll;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user