Browse Source

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

Fix selection update on editor focusin event
Ian Rose 6 years ago
parent
commit
69d116cab7
1 changed files with 5 additions and 0 deletions
  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();
   }
 
   /**