Parcourir la source

Merge pull request #4932 from declanvk/fix-editor-selection-change

Fix selection update on editor focusin event
Ian Rose il y a 6 ans
Parent
commit
69d116cab7
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      packages/codemirror/src/editor.ts

+ 5 - 0
packages/codemirror/src/editor.ts

@@ -823,6 +823,11 @@ export class CodeMirrorEditor implements CodeEditor.IEditor {
       this.refresh();
     }
     this.host.classList.add('jp-mod-focused');
+
+    // Update the selections on editor gaining focus because
+    // the onCursorActivity function filters usual cursor events
+    // based on the editor's focus.
+    this._onCursorActivity();
   }
 
   /**