Explorar o código

Clean up console refocus on enter

Steven Silvester %!s(int64=8) %!d(string=hai) anos
pai
achega
a578746476
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/console/widget.ts

+ 1 - 0
src/console/widget.ts

@@ -443,6 +443,7 @@ class CodeConsole extends Widget {
   private _evtKeyDown(event: KeyboardEvent): void {
     let editor = this.prompt.editor;
     if (event.keyCode === 13 && !editor.hasFocus()) {
+      event.preventDefault();
       editor.focus();
     }
   }