File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 593593 // Keyboard for inline panel
594594 function onKeyDown ( e ) {
595595 // Check if we're dealing with shadow DOM retargeting
596- const actualTarget = e . composedPath ? e . composedPath ( ) [ 0 ] : e . target ;
597- const actualTag = ( actualTarget && actualTarget . tagName || '' ) . toUpperCase ( ) ;
598-
596+ const actualTarget = e . composedPath
597+ ? e . composedPath ( ) [ 0 ]
598+ : e . target ;
599+ const actualTag = (
600+ ( actualTarget && actualTarget . tagName ) ||
601+ ''
602+ ) . toUpperCase ( ) ;
603+
599604 // Always allow ESC to close
600605 if ( e . key === 'Escape' ) {
601606 close ( ) ;
602607 e . preventDefault ( ) ;
603608 return ;
604609 }
605-
610+
606611 // Don't trigger hotkeys when typing in input fields anywhere
607612 // Use actualTag to check the real target element
608613 if (
612617 ) {
613618 return ;
614619 }
615-
620+
616621 // Only handle numeric hotkeys when not in an input field
617622 if ( e . key >= '0' && e . key <= '9' ) {
618623 const items = sortedScripts ( ) ;
755760 } , 1000 ) ;
756761 }
757762 }
758- } ) ( ) ;
763+ } ) ( ) ;
You can’t perform that action at this time.
0 commit comments