(event: KeyboardEvent)
| 137 | } |
| 138 | |
| 139 | async _keydownHandler(event: KeyboardEvent) { |
| 140 | const openUI5Support = getFeature<typeof OpenUI5Support>("OpenUI5Support"); |
| 141 | const isOpenUI5Detected = openUI5Support && openUI5Support.isOpenUI5Detected(); |
| 142 | |
| 143 | if (isOpenUI5Detected) { |
| 144 | this.destroy(); |
| 145 | return; |
| 146 | } |
| 147 | |
| 148 | const forward = isF6Next(event); |
| 149 | const backward = isF6Previous(event); |
| 150 | if (!(forward || backward)) { |
| 151 | return; |
| 152 | } |
| 153 | |
| 154 | this.updateGroups(); |
| 155 | |
| 156 | if (this.groups.length < 1) { |
| 157 | return; |
| 158 | } |
| 159 | |
| 160 | event.preventDefault(); |
| 161 | |
| 162 | let elementToFocus; |
| 163 | |
| 164 | if (this.groups.length === 0) { |
| 165 | elementToFocus = await this.groupElementToFocus(this.groups[0]); |
| 166 | |
| 167 | return elementToFocus?.focus(); |
| 168 | } |
| 169 | |
| 170 | let currentIndex = -1; |
| 171 | |
| 172 | if (this.selectedGroup) { |
| 173 | currentIndex = this.groups.indexOf(this.selectedGroup); |
| 174 | } |
| 175 | |
| 176 | if (forward) { |
| 177 | elementToFocus = await this.findNextFocusableGroupElement(currentIndex); |
| 178 | } |
| 179 | |
| 180 | if (backward) { |
| 181 | elementToFocus = await this.findPreviousFocusableGroupElement(currentIndex); |
| 182 | } |
| 183 | |
| 184 | elementToFocus?.focus(); |
| 185 | } |
| 186 | |
| 187 | updateGroups() { |
| 188 | const container = this.findContainer(); |
nothing calls this directly
no test coverage detected