From 42543577e86fefe1e564926b01f35e9f3aaa8c1e Mon Sep 17 00:00:00 2001 From: Aman Harwara Date: Wed, 18 Oct 2023 01:57:22 +0530 Subject: [PATCH] chore: fix scroll on click --- .../SuperEditor/Plugins/ToolbarPlugin/ToolbarPlugin.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/web/src/javascripts/Components/SuperEditor/Plugins/ToolbarPlugin/ToolbarPlugin.tsx b/packages/web/src/javascripts/Components/SuperEditor/Plugins/ToolbarPlugin/ToolbarPlugin.tsx index 3018214e9..1189bfe80 100644 --- a/packages/web/src/javascripts/Components/SuperEditor/Plugins/ToolbarPlugin/ToolbarPlugin.tsx +++ b/packages/web/src/javascripts/Components/SuperEditor/Plugins/ToolbarPlugin/ToolbarPlugin.tsx @@ -698,7 +698,9 @@ const ToolbarPlugin = () => { } const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches domElement.scrollIntoView({ behavior: reducedMotion ? 'auto' : 'smooth', block: 'nearest' }) - editor.focus() + if (isMobile) { + editor.focus() + } }) }} >