mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-15 20:04:29 +08:00
fixed a bug where backspacing the first word in the first row after scrolling would break the website
This commit is contained in:
parent
5c954c91a0
commit
73433fed13
1 changed files with 5 additions and 1 deletions
|
|
@ -3491,7 +3491,11 @@ $(document).keydown((event) => {
|
|||
if (event["keyCode"] == 8) {
|
||||
event.preventDefault();
|
||||
if (!testActive) return;
|
||||
if (currentInput == "" && inputHistory.length > 0) {
|
||||
if (
|
||||
currentInput == "" &&
|
||||
inputHistory.length > 0 &&
|
||||
currentWordElementIndex > 0
|
||||
) {
|
||||
if (
|
||||
(inputHistory[currentWordIndex - 1] ==
|
||||
wordsList[currentWordIndex - 1] &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue