From 6f81505ee4536f0c735ad63735a21f72f5254797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Trzci=C5=84ski?= Date: Thu, 3 Oct 2024 09:33:40 +0200 Subject: [PATCH] [#66717] only scroll editor on preview click if it is enabled --- src/MystEditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MystEditor.js b/src/MystEditor.js index f19ff82..2821631 100644 --- a/src/MystEditor.js +++ b/src/MystEditor.js @@ -232,7 +232,7 @@ const MystEditor = ({ ref=${preview} mode=${mode} onClick=${(ev) => { - handlePreviewClickToScroll(ev, text.lineMap, preview); + if (syncScroll && mode == "Both") handlePreviewClickToScroll(ev, text.lineMap, preview); }} ><${PreviewFocusHighlight} className="cm-previewFocus" />