Skip to content

Commit 7f6d4ac

Browse files
committed
Fixed lock button not appearing
1 parent 6631f98 commit 7f6d4ac

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

browser/main/Detail/MarkdownNoteDetail.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ class MarkdownNoteDetail extends React.Component {
4141
title: '',
4242
content: ''
4343
}, props.note),
44-
isLockButtonShown: false,
44+
isLockButtonShown: props.config.editor.type !== 'SPLIT',
4545
isLocked: false,
46-
editorType: props.config.editor.type
46+
editorType: props.config.editor.type,
47+
switchPreview: props.config.editor.switchPreview
4748
}
4849
this.dispatchTimer = null
4950

@@ -63,6 +64,9 @@ class MarkdownNoteDetail extends React.Component {
6364
})
6465
ee.on('hotkey:deletenote', this.handleDeleteNote.bind(this))
6566
ee.on('code:generate-toc', this.generateToc)
67+
68+
// Focus content if using blur or double click
69+
if (this.state.switchPreview === 'BLUR' || this.state.switchPreview === 'DBL_CLICK') this.focus()
6670
}
6771

6872
componentWillReceiveProps (nextProps) {

0 commit comments

Comments
 (0)