mirror of
https://github.com/linsa-io/linsa.git
synced 2026-01-11 20:00:23 +01:00
chore: temp disable focusable editor
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user