From ece42490352d23318a14c2db47b54f1908466bf3 Mon Sep 17 00:00:00 2001 From: vipinpaul Date: Thu, 29 Jun 2023 17:29:18 +0530 Subject: [PATCH] Fixing auto scroll issue --- renderer/src/components/EditorPage/ObsEditor/ReferenceObs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderer/src/components/EditorPage/ObsEditor/ReferenceObs.js b/renderer/src/components/EditorPage/ObsEditor/ReferenceObs.js index 1b87be80..18cd75c8 100644 --- a/renderer/src/components/EditorPage/ObsEditor/ReferenceObs.js +++ b/renderer/src/components/EditorPage/ObsEditor/ReferenceObs.js @@ -52,7 +52,7 @@ const { t } = useTranslation(); if (stories && selectedStory !== undefined) { const currentRef = itemEls.current.filter((obj) => obj.id === selectedStory)[0]?.el; if (currentRef) { - currentRef.scrollIntoView({ behavior: 'smooth', block: 'end', inline: 'nearest' }); + currentRef.scrollIntoView({ block: 'center', inline: 'nearest' }); } } }, [selectedStory, stories]);