File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,10 @@ class MarkdownNoteDetail extends React.Component {
41
41
title : '' ,
42
42
content : ''
43
43
} , props . note ) ,
44
- isLockButtonShown : false ,
44
+ isLockButtonShown : props . config . editor . type !== 'SPLIT' ,
45
45
isLocked : false ,
46
- editorType : props . config . editor . type
46
+ editorType : props . config . editor . type ,
47
+ switchPreview : props . config . editor . switchPreview
47
48
}
48
49
this . dispatchTimer = null
49
50
@@ -63,6 +64,9 @@ class MarkdownNoteDetail extends React.Component {
63
64
} )
64
65
ee . on ( 'hotkey:deletenote' , this . handleDeleteNote . bind ( this ) )
65
66
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 ( )
66
70
}
67
71
68
72
componentWillReceiveProps ( nextProps ) {
You can’t perform that action at this time.
0 commit comments