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 [isInitialSync, setIsInitialSync] = React.useState(true)
const { id: pageId, title: pageTitle } = page
// const { id: pageId, title: pageTitle } = page
React.useEffect(() => {
if (!pageId) return
// React.useEffect(() => {
// if (!pageId) return
if (!pageTitle && titleEditorRef.current) {
titleEditorRef.current.commands.focus()
} else if (contentEditorRef.current) {
contentEditorRef.current.commands.focus()
}
}, [pageId, pageTitle])
// if (!pageTitle && titleEditorRef.current) {
// titleEditorRef.current.commands.focus()
// } else if (contentEditorRef.current) {
// contentEditorRef.current.commands.focus()
// }
// }, [pageId, pageTitle])
React.useEffect(() => {
if (!page) return