@@ -186,23 +186,6 @@ class NoteContentEditor extends Component<Props> {
186
186
187
187
componentDidMount ( ) {
188
188
const { noteId } = this . props ;
189
- this . bootTimer = setTimeout ( ( ) => {
190
- if ( noteId === this . props . noteId ) {
191
- this . setState ( {
192
- editor : 'full' ,
193
- content : withCheckboxCharacters ( this . props . note . content ) ,
194
- } ) ;
195
- const position = getNotePosition ( noteId ) ;
196
- if ( position ) {
197
- this . editor ?. setScrollPosition ( {
198
- scrollTop : position ,
199
- } ) ;
200
- }
201
- }
202
- } , SPEED_DELAY ) ;
203
- this . focusEditor ( ) ;
204
- this . props . storeFocusEditor ( this . focusEditor ) ;
205
- this . props . storeHasFocus ( this . hasFocus ) ;
206
189
window . addEventListener ( 'resize' , clearNotePositions ) ;
207
190
window . addEventListener ( 'toggleChecklist' , this . handleChecklist , true ) ;
208
191
this . toggleShortcuts ( true ) ;
@@ -613,6 +596,19 @@ class NoteContentEditor extends Component<Props> {
613
596
editorReady : EditorDidMount = ( editor , monaco ) => {
614
597
this . editor = editor ;
615
598
599
+ this . focusEditor ( ) ;
600
+ this . props . storeFocusEditor ( this . focusEditor ) ;
601
+ this . props . storeHasFocus ( this . hasFocus ) ;
602
+
603
+ this . bootTimer = setTimeout ( ( ) => {
604
+ const position = getNotePosition ( this . props . noteId ) ;
605
+ if ( position ) {
606
+ this . editor ?. setScrollPosition ( {
607
+ scrollTop : position ,
608
+ } ) ;
609
+ }
610
+ } , SPEED_DELAY ) ;
611
+
616
612
monaco . languages . registerLinkProvider ( 'plaintext' , {
617
613
provideLinks : ( model ) => {
618
614
const matches = model . findMatches (
0 commit comments