Skip to content

Commit

Permalink
Fixed lock button not appearing
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelalexbt committed Dec 19, 2018
1 parent 6631f98 commit 7f6d4ac
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions browser/main/Detail/MarkdownNoteDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ class MarkdownNoteDetail extends React.Component {
title: '',
content: ''
}, props.note),
isLockButtonShown: false,
isLockButtonShown: props.config.editor.type !== 'SPLIT',
isLocked: false,
editorType: props.config.editor.type
editorType: props.config.editor.type,
switchPreview: props.config.editor.switchPreview
}
this.dispatchTimer = null

Expand All @@ -63,6 +64,9 @@ class MarkdownNoteDetail extends React.Component {
})
ee.on('hotkey:deletenote', this.handleDeleteNote.bind(this))
ee.on('code:generate-toc', this.generateToc)

// Focus content if using blur or double click
if (this.state.switchPreview === 'BLUR' || this.state.switchPreview === 'DBL_CLICK') this.focus()
}

componentWillReceiveProps (nextProps) {
Expand Down

0 comments on commit 7f6d4ac

Please sign in to comment.