mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-20 15:26:15 +08:00
fixed sound not playing on backspace
This commit is contained in:
parent
e5eec1220f
commit
1cb0c8d2a2
|
@ -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) ||
|
||||
|
|
Loading…
Reference in a new issue