浏览代码

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

Fix selection update on editor focusin event
Ian Rose 6 年之前
父节点
当前提交
69d116cab7
共有 1 个文件被更改,包括 5 次插入0 次删除
  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();
   }
 
   /**