Skip to content

Commit

Permalink
Focus redo button on run completion.
Browse files Browse the repository at this point in the history
The goal is to have a smoother experience when doing multiple
sessions in a row.
  • Loading branch information
Thomas-B committed Sep 22, 2019
1 parent f7a012b commit 188806b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.js
@@ -1,6 +1,7 @@
// Get document element
const textDisplay = document.querySelector('#text-display');
const inputField = document.querySelector('#input-field');
const redoButton = document.querySelector('#redo-button');

// Initialize typing mode variables
let typingMode = 'wordcount';
Expand Down Expand Up @@ -199,6 +200,7 @@ inputField.addEventListener('keydown', e => {
correctKeys += wordList[currentWord].length;
currentWord++;
showResult();
redoButton.focus()
}
}
});
Expand Down Expand Up @@ -435,5 +437,3 @@ function hideThemeCenter() {
document.getElementById('theme-center').classList.add('hidden');
document.getElementById('command-center').classList.remove('hidden');
}


0 comments on commit 188806b

Please sign in to comment.