fixed sound not playing on backspace

This commit is contained in:
Jack 2021-09-30 13:50:44 +01:00
parent e5eec1220f
commit 1cb0c8d2a2

View file

@ -111,8 +111,6 @@ function handleTab(event) {
function backspaceToPrevious() {
if (!TestLogic.active) return;
Sound.playClick(Config.playSoundOnClick);
if (
TestLogic.input.history.length == 0 ||
TestUI.currentWordElementIndex == 0
@ -668,6 +666,7 @@ $(document).keydown((event) => {
//blocking firefox from going back in history with backspace
if (event.key === "Backspace") {
Sound.playClick(Config.playSoundOnClick);
let t = /INPUT|SELECT|TEXTAREA/i;
if (
!t.test(event.target.tagName) ||