浏览代码

Actually attach the completer

Steven Silvester 8 年之前
父节点
当前提交
cc9855d146
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 5 0
      src/console/panel.ts
  2. 1 0
      src/notebook/notebook/panel.ts

+ 5 - 0
src/console/panel.ts

@@ -17,6 +17,10 @@ import {
   Panel
 } from 'phosphor/lib/ui/panel';
 
+import {
+  Widget
+} from 'phosphor/lib/ui/widget';
+
 import {
   IEditorMimeTypeService, CodeEditor
 } from '../codeeditor';
@@ -81,6 +85,7 @@ class ConsolePanel extends Panel {
 
     // Set the completer widget's anchor node to peg its position.
     this._completer.anchor = this.node;
+    Widget.attach(this._completer, document.body);
 
     // Instantiate the completer handler.
     this._completerHandler = factory.createCompleterHandler({

+ 1 - 0
src/notebook/notebook/panel.ts

@@ -129,6 +129,7 @@ class NotebookPanel extends Widget {
 
     // Set the completer widget's anchor node to peg its position.
     this._completer.anchor = this.notebook.node;
+    Widget.attach(this._completer, document.body);
 
     // Instantiate the completer handler.
     this._completerHandler = factory.createCompleterHandler({