File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
invokeai/frontend/web/src/common/components Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { useAppSelector } from 'app/store/storeHooks';
66import { activeTabNameSelector } from 'features/ui/store/uiSelectors' ;
77import type { AnimationProps } from 'framer-motion' ;
88import { AnimatePresence , motion } from 'framer-motion' ;
9- import type { KeyboardEvent , PropsWithChildren } from 'react' ;
9+ import type { PropsWithChildren } from 'react' ;
1010import { memo , useCallback , useEffect , useState } from 'react' ;
1111import type { Accept , FileRejection } from 'react-dropzone' ;
1212import { useDropzone } from 'react-dropzone' ;
@@ -118,6 +118,7 @@ const ImageUploader = (props: PropsWithChildren) => {
118118 onDrop,
119119 onDragOver,
120120 multiple : false ,
121+ noKeyboard : true ,
121122 } ) ;
122123
123124 useEffect ( ( ) => {
@@ -143,15 +144,8 @@ const ImageUploader = (props: PropsWithChildren) => {
143144 } ;
144145 } , [ inputRef ] ) ;
145146
146- const handleKeyDown = useCallback ( ( e : KeyboardEvent ) => {
147- // Bail out if user hits spacebar - do not open the uploader
148- if ( e . key === ' ' ) {
149- return ;
150- }
151- } , [ ] ) ;
152-
153147 return (
154- < Box { ...getRootProps ( dropzoneRootProps ) } onKeyDown = { handleKeyDown } >
148+ < Box { ...getRootProps ( dropzoneRootProps ) } >
155149 < input { ...getInputProps ( ) } />
156150 { props . children }
157151 < AnimatePresence >
You can’t perform that action at this time.
0 commit comments