()
| 169 | } |
| 170 | |
| 171 | private _registerModalHotkeys(): void { |
| 172 | const manager = getHotkeyManager() |
| 173 | const modal = this.modalRef.value |
| 174 | if (!modal) return |
| 175 | |
| 176 | this._modalRegistrations.push( |
| 177 | manager.register( |
| 178 | 'Escape', |
| 179 | () => { |
| 180 | this.lastHotkey = 'Escape' |
| 181 | this.modalShortcutCount++ |
| 182 | this.modalOpen = false |
| 183 | }, |
| 184 | { target: modal }, |
| 185 | ), |
| 186 | manager.register( |
| 187 | 'Mod+Enter', |
| 188 | () => { |
| 189 | this.lastHotkey = 'Mod+Enter' |
| 190 | this.modalShortcutCount++ |
| 191 | alert('Modal submit shortcut!') |
| 192 | }, |
| 193 | { target: modal }, |
| 194 | ), |
| 195 | ) |
| 196 | } |
| 197 | |
| 198 | render() { |
| 199 | return html` <div class="app"> |
no test coverage detected