mirror of
https://github.com/linsa-io/linsa.git
synced 2026-01-12 12:20: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 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
|
||||||
|
|||||||
Reference in New Issue
Block a user