Restore button focus after stopping

This commit is contained in:
Joshua Bell 2015-12-02 23:01:14 -08:00
parent 03bad52bdd
commit 3542aa89e6
2 changed files with 2 additions and 1 deletions

View File

@ -113,6 +113,7 @@ By <a href="mailto:inexorabletash@gmail.com">Joshua Bell</a>
</textarea>
<button id="btn_save" title="Save">&#x1f4be;</button>
<button id="btn_load" title="Load">&#x1f4c2;</button>
<input type="submit" id="btn_share" value="Share your sample!">
<input type="button" id="show_paper" value="Show output" title="Echo all output to a &quot;print-out&quot;, so you can copy/paste">
<input type="button" id="hide_paper" value="Hide output" title="Hide the &quot;print-out&quot;">

View File

@ -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();