File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -216,13 +216,12 @@ function commit(selected: Element, details: Element) {
216
216
217
217
function keydown ( details : Element , menu : DetailsMenuElement , event : Event ) {
218
218
if ( ! ( event instanceof KeyboardEvent ) ) return
219
- const state = states . get ( menu )
220
- if ( ! state ) return
221
- if ( state . isComposing ) return
222
- const isSummaryFocused = event . target instanceof Element && event . target . tagName === 'SUMMARY'
223
-
224
219
// Ignore key presses from nested details.
225
220
if ( details . querySelector ( 'details[open]' ) ) return
221
+ const state = states . get ( menu )
222
+ if ( ! state || state . isComposing ) return
223
+
224
+ const isSummaryFocused = event . target instanceof Element && event . target . tagName === 'SUMMARY'
226
225
227
226
switch ( event . key ) {
228
227
case 'Escape' :
You can’t perform that action at this time.
0 commit comments