| 102 | } |
| 103 | |
| 104 | function shouldDispatchToBlock(e: WaveKeyboardEvent): boolean { |
| 105 | if (globalStore.get(atoms.modalOpen)) { |
| 106 | return false; |
| 107 | } |
| 108 | const activeElem = document.activeElement; |
| 109 | if (activeElem != null && activeElem instanceof HTMLElement) { |
| 110 | if (activeElem.tagName == "INPUT" || activeElem.tagName == "TEXTAREA" || activeElem.contentEditable == "true") { |
| 111 | if (activeElem.classList.contains("dummy-focus") || activeElem.classList.contains("dummy")) { |
| 112 | return true; |
| 113 | } |
| 114 | if (keyutil.isInputEvent(e)) { |
| 115 | return false; |
| 116 | } |
| 117 | return true; |
| 118 | } |
| 119 | } |
| 120 | return true; |
| 121 | } |
| 122 | |
| 123 | function getStaticTabBlockCount(): number { |
| 124 | const tabId = globalStore.get(atoms.staticTabId); |