diff --git a/services/web/frontend/js/features/source-editor/hooks/use-codemirror-scope.ts b/services/web/frontend/js/features/source-editor/hooks/use-codemirror-scope.ts index 5ee52286bd..008f98f03e 100644 --- a/services/web/frontend/js/features/source-editor/hooks/use-codemirror-scope.ts +++ b/services/web/frontend/js/features/source-editor/hooks/use-codemirror-scope.ts @@ -232,7 +232,9 @@ function useCodeMirrorScope(view: EditorView) { spellCheckLanguage, hunspellManager, } - view.dispatch(setSpellCheckLanguage(spellingRef.current)) + window.setTimeout(() => { + view.dispatch(setSpellCheckLanguage(spellingRef.current)) + }) }, [view, spellCheckLanguage, hunspellManager]) const projectFeaturesRef = useRef(projectFeatures)