File tree Expand file tree Collapse file tree 1 file changed +30
-2
lines changed
Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -89,8 +89,36 @@ export default function usePickerInput({
8989 return ;
9090 }
9191 }
92-
93- if ( ! open && ! [ KeyCode . SHIFT ] . includes ( e . which ) ) {
92+
93+ const ignoreKeys = [
94+ KeyCode . F1 ,
95+ KeyCode . F2 ,
96+ KeyCode . F3 ,
97+ KeyCode . F4 ,
98+ KeyCode . F5 ,
99+ KeyCode . F6 ,
100+ KeyCode . F7 ,
101+ KeyCode . F8 ,
102+ KeyCode . F9 ,
103+ KeyCode . F10 ,
104+ KeyCode . F11 ,
105+ KeyCode . F12 ,
106+ 145 , // SCROLL_LOCK
107+ KeyCode . PAUSE ,
108+ KeyCode . INSERT ,
109+ KeyCode . PAGE_UP ,
110+ KeyCode . PAGE_DOWN ,
111+ KeyCode . NUM_CENTER ,
112+ KeyCode . NUMLOCK ,
113+ KeyCode . CAPS_LOCK ,
114+ KeyCode . CTRL ,
115+ KeyCode . SHIFT ,
116+ KeyCode . ALT ,
117+ KeyCode . META , // WIN_KEY_LEFT
118+ KeyCode . WIN_KEY_RIGHT ,
119+ ] ;
120+
121+ if ( ! open && ! ignoreKeys . includes ( e . which ) ) {
94122 triggerOpen ( true ) ;
95123 } else if ( ! typing ) {
96124 // Let popup panel handle keyboard
You can’t perform that action at this time.
0 commit comments