chore: temp disable focusable editor

This commit is contained in:
Aslam H
2024-11-09 13:30:36 +07:00
parent eea862c15b
commit b8336d50e6

View File

@@ -139,17 +139,17 @@ const DetailPageForm = ({
const contentEditorRef = React.useRef<Editor | null>(null) const contentEditorRef = React.useRef<Editor | null>(null)
const [isInitialSync, setIsInitialSync] = React.useState(true) const [isInitialSync, setIsInitialSync] = React.useState(true)
const { id: pageId, title: pageTitle } = page // const { id: pageId, title: pageTitle } = page
React.useEffect(() => { // React.useEffect(() => {
if (!pageId) return // if (!pageId) return
if (!pageTitle && titleEditorRef.current) { // if (!pageTitle && titleEditorRef.current) {
titleEditorRef.current.commands.focus() // titleEditorRef.current.commands.focus()
} else if (contentEditorRef.current) { // } else if (contentEditorRef.current) {
contentEditorRef.current.commands.focus() // contentEditorRef.current.commands.focus()
} // }
}, [pageId, pageTitle]) // }, [pageId, pageTitle])
React.useEffect(() => { React.useEffect(() => {
if (!page) return if (!page) return