fix: Only autofocus super notes when creating new note (#2063)

This commit is contained in:
Aman Harwara
2022-11-28 23:38:45 +05:30
committed by GitHub
parent 60cbd7aed2
commit 96e8dfdd31
2 changed files with 2 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ import { useCommandService } from '@/Components/ApplicationView/CommandProvider'
import { SUPER_SHOW_MARKDOWN_PREVIEW } from '@standardnotes/ui-services'
import { SuperNoteMarkdownPreview } from './SuperNoteMarkdownPreview'
import { ExportPlugin } from './Plugins/ExportPlugin/ExportPlugin'
import { AutoFocusPlugin } from '@lexical/react/LexicalAutoFocusPlugin'
const NotePreviewCharLimit = 160
@@ -157,6 +158,7 @@ export const SuperEditor: FunctionComponent<Props> = ({
<NodeObserverPlugin nodeType={BubbleNode} onRemove={handleBubbleRemove} />
<NodeObserverPlugin nodeType={FileNode} onRemove={handleBubbleRemove} />
<ExportPlugin />
{controller.isTemplateNote ? <AutoFocusPlugin /> : null}
</BlocksEditor>
</BlocksEditorComposer>
</FilesControllerProvider>