瀏覽代碼

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';
   }
 
   /**