From 61154ba618ab8e1598f491216622fffd426b178d Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Thu, 22 Sep 2022 09:59:31 -0400 Subject: [PATCH] fix: Scroll to header does not work when header contains Chinese characters --- app/scenes/Document/components/Editor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scenes/Document/components/Editor.tsx b/app/scenes/Document/components/Editor.tsx index d20c3416f..372d5e7b7 100644 --- a/app/scenes/Document/components/Editor.tsx +++ b/app/scenes/Document/components/Editor.tsx @@ -106,7 +106,7 @@ function DocumentEditor(props: Props, ref: React.RefObject) { ref={ref} autoFocus={!!document.title && !props.defaultValue} placeholder={t("Type '/' to insert, or start writing…")} - scrollTo={window.location.hash} + scrollTo={decodeURIComponent(window.location.hash)} readOnly={readOnly} shareId={shareId} extensions={fullPackage}