浏览代码

feat: now after running the code the focus will go to terminl title

Marcelo Vilas Boas Correa Filho 3 年之前
父节点
当前提交
ac526bab7e
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      js/accessibleUI/compiler.js

+ 3 - 0
js/accessibleUI/compiler.js

@@ -17,6 +17,7 @@ let isRunning = false;
 let domConsole = new DOMConsole("terminal");
 
 //
+const ivprogConsoleTitleSpan = document.getElementById('ivprog-console-title-span');
 const runCodePlayIcon = document.getElementById('runCodePlayIcon');
 const runCodeStopIcon = document.getElementById('runCodeStopIcon');
 
@@ -106,8 +107,10 @@ export function runCode () {
                     isRunning = false;
                     proc = null;
                     showRunButton();
+                    ivprogConsoleTitleSpan.focus();
                     return true;
                 }
+
                 return false;
             }, 100);
         }).catch(err => {