소스 검색

Clean up notebook blur behavior

Steven Silvester 8 년 전
부모
커밋
158f80456b
1개의 변경된 파일1개의 추가작업 그리고 9개의 파일을 삭제
  1. 1 9
      packages/notebook/src/widget.ts

+ 1 - 9
packages/notebook/src/widget.ts

@@ -1387,15 +1387,7 @@ class Notebook extends StaticNotebook {
    * Handle `blur` events for the notebook.
    */
   private _evtBlur(event: MouseEvent): void {
-    let relatedTarget = event.relatedTarget as HTMLElement;
-    if (!this.node.contains(relatedTarget)) {
-      return;
-    }
-    // If the root node is not blurring and we are in command mode,
-    // focus ourselves.
-    if (this.mode === 'command' && event.target !== this.node) {
-      this.node.focus();
-    }
+    this.mode = 'command';
   }
 
   /**