From 3542aa89e65736cde23fddb223aa901473858bc5 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Wed, 2 Dec 2015 23:01:14 -0800 Subject: [PATCH] Restore button focus after stopping --- index.html | 1 + index.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 8009c4e..68956a4 100644 --- a/index.html +++ b/index.html @@ -113,6 +113,7 @@ By Joshua Bell + diff --git a/index.js b/index.js index ee5ca68..21115c0 100644 --- a/index.js +++ b/index.js @@ -207,7 +207,7 @@ window.addEventListener('DOMContentLoaded', function () { $("#btn_run").disabled = stopped ? "" : "disabled"; $("#lb_files").disabled = stopped ? "" : "disabled"; - if (btnFocus) { + if (btnFocus || stopped) { $(stopped ? "#btn_run" : "#btn_stop").focus(); } else { tty.focus();