2
0

2 Commits 0e85d6777f ... e04ecc32f6

Autor SHA1 Nachricht Datum
  Marcelo Vilas Boas Correa Filho e04ecc32f6 feat: added id and tabindex to terminal title and each text line vor 3 Jahren
  Marcelo Vilas Boas Correa Filho ac526bab7e feat: now after running the code the focus will go to terminl title vor 3 Jahren
2 geänderte Dateien mit 5 neuen und 2 gelöschten Zeilen
  1. 3 0
      js/accessibleUI/compiler.js
  2. 2 2
      js/io/domConsole.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 => {

+ 2 - 2
js/io/domConsole.js

@@ -7,7 +7,7 @@ export class DOMConsole {
     return `
     <div class="bash-title">
       <i id="ivprog-console-clearbtn" class="icon eraser" style="float:left;padding-left: 5px"></i>
-      <span>Terminal</span>
+      <span id="ivprog-console-title-span" tabindex="0">Terminal</span>
       <i id="ivprog-console-showbtn" class="icon window maximize outline" style="float:right"></i>
       <i id="ivprog-console-hidebtn" class="icon window minimize outline" style="float:right"></i>
     </div>
@@ -256,7 +256,7 @@ export class DOMConsole {
 
   getOutputText (text) {
     text = text.replace(/\s/g, "&#160;");
-    return `<span>${text}</span>`;
+    return `<span tabindex="0">${text}</span>`;
   }
 
   getUserInputText (text) {