From 9c1b9387031a40215c312dfb5a6bf7288802a243 Mon Sep 17 00:00:00 2001 From: Aleksandr Lushkin Date: Mon, 24 Jul 2023 12:28:55 +0200 Subject: [PATCH] Web: Components: Fix scroll when file element is not visible --- packages/client/src/store/HotkeyStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/store/HotkeyStore.js b/packages/client/src/store/HotkeyStore.js index 6511c6a323..1709cfccdd 100644 --- a/packages/client/src/store/HotkeyStore.js +++ b/packages/client/src/store/HotkeyStore.js @@ -34,7 +34,7 @@ class HotkeyStore { scrollToCaret = () => { const { offsetTop, item } = this.getItemOffset(); - const scroll = document.getElementsByClassName("section-scroll")[0]; + const scroll = document.getElementById("sectionScroll"); const scrollRect = scroll?.getBoundingClientRect(); if (item && item[0]) {