@@ -186,23 +186,6 @@ class NoteContentEditor extends Component<Props> {
186186
187187 componentDidMount ( ) {
188188 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 ) ;
206189 window . addEventListener ( 'resize' , clearNotePositions ) ;
207190 window . addEventListener ( 'toggleChecklist' , this . handleChecklist , true ) ;
208191 this . toggleShortcuts ( true ) ;
@@ -613,6 +596,19 @@ class NoteContentEditor extends Component<Props> {
613596 editorReady : EditorDidMount = ( editor , monaco ) => {
614597 this . editor = editor ;
615598
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+
616612 monaco . languages . registerLinkProvider ( 'plaintext' , {
617613 provideLinks : ( model ) => {
618614 const matches = model . findMatches (
0 commit comments