File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
apps/sim/app/workspace/[workspaceId]/home/components/user-input/components Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ export const PlusMenuDropdown = React.memo(
8181 e . preventDefault ( )
8282 const firstItem = contentRef . current ?. querySelector < HTMLElement > ( '[role="menuitem"]' )
8383 firstItem ?. focus ( )
84- } else if ( e . key === 'Enter' ) {
84+ } else if ( e . key === 'Enter' || e . key === 'Tab' ) {
8585 e . preventDefault ( )
8686 const first = filteredItemsRef . current ?. [ 0 ]
8787 if ( first ) handleSelect ( { type : first . type , id : first . item . id , title : first . item . name } )
@@ -99,6 +99,12 @@ export const PlusMenuDropdown = React.memo(
9999 e . preventDefault ( )
100100 searchRef . current ?. focus ( )
101101 }
102+ } else if ( e . key === 'Tab' ) {
103+ const focused = document . activeElement as HTMLElement | null
104+ if ( focused ?. getAttribute ( 'role' ) === 'menuitem' ) {
105+ e . preventDefault ( )
106+ focused . click ( )
107+ }
102108 }
103109 } , [ ] )
104110
You can’t perform that action at this time.
0 commit comments