SheikhRamil2021-03-05 16:10:03
SheikhRamil, 2021-03-05 16:10:03

After the end of the game, all actions were canceled (Hangman game)?

after the end of the game (the user did not guess the word), a modal window appears. How to make it so that while the window is actively canceled, I thought that e.preventDefault(), but it didn’t work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Oleg, 2021-03-05

To your document.addEventListener('keydown', (e) => {... , you need to add a condition that checks whether the modal is closed or not, for example, by checking the display property.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question