MCPcopy Index your code
hub / github.com/MALSync/MALSync / keyInterrupt

Method keyInterrupt

src/_provider/Search/vueSearchClass.ts:59–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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}

Callers 1

openCorrectionMethod · 0.95

Calls 2

isCorrectionMenuOpenMethod · 0.95
infoMethod · 0.45

Tested by

no test coverage detected