mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-08-29 10:09:26 +02:00
mobile: fix readonly title editable
This commit is contained in:
@@ -174,7 +174,7 @@ const Tiptap = ({
|
||||
element: getContentDiv(),
|
||||
editable: !tab.session?.readonly,
|
||||
editorProps: {
|
||||
editable: () => !tab.session?.readonly,
|
||||
editable: () => !tabRef.current.session?.readonly,
|
||||
handlePaste: (view, event) => {
|
||||
const hasFiles = event.clipboardData?.types?.some((type) =>
|
||||
type.startsWith("Files")
|
||||
@@ -602,7 +602,7 @@ const Tiptap = ({
|
||||
|
||||
<Title
|
||||
titlePlaceholder={controller.titlePlaceholder}
|
||||
readonly={settings.readonly}
|
||||
readonly={tab.session?.readonly || settings.readonly || false}
|
||||
controller={controllerRef}
|
||||
title={controller.title}
|
||||
fontFamily={settings.fontFamily}
|
||||
|
||||
@@ -111,7 +111,7 @@ function Title({
|
||||
id="editor-title"
|
||||
rows={1}
|
||||
contentEditable={!readonly}
|
||||
disabled={readonly}
|
||||
readOnly={readonly}
|
||||
defaultValue={title}
|
||||
style={{
|
||||
height: 40,
|
||||
|
||||
Reference in New Issue
Block a user