()
| 57 | |
| 58 | // Stops keys when correction menu is open. Prevents unwanted behaviour like for example opening the next episode. |
| 59 | public keyInterrupt() { |
| 60 | if (this.keyInterruptRunning) return; |
| 61 | this.keyInterruptRunning = true; |
| 62 | document.addEventListener('keydown', e => { |
| 63 | if (this.isCorrectionMenuOpen()) { |
| 64 | e.stopImmediatePropagation(); |
| 65 | con.info('Correction menu is open, stopped keydown event'); |
| 66 | } |
| 67 | }); |
| 68 | } |
| 69 | } |
no test coverage detected