Skip to content

Commit

Permalink
chore: upload: account for shift key and tab
Browse files Browse the repository at this point in the history
  • Loading branch information
dkilgore-eightfold committed Oct 17, 2023
1 parent 8e3e99f commit da2ffa2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Upload/Upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,10 @@ const InternalUpload: React.ForwardRefRenderFunction<unknown, UploadProps> = (
disabled={mergedDisabled}
htmlType={'button'}
onKeyDown={(event: React.KeyboardEvent<HTMLButtonElement>) => {
if (event.key !== eventKeys.TAB) {
if (
event?.key !== eventKeys.TAB ||
(event?.key !== eventKeys.TAB && !event?.shiftKey)
) {
event.preventDefault();
}
}}
Expand Down

0 comments on commit da2ffa2

Please sign in to comment.