Skip to content

Commit

Permalink
fix(17398): fix focus order in firefox (#17435)
Browse files Browse the repository at this point in the history
  • Loading branch information
2nikhiltom committed Sep 13, 2024
1 parent fac1c48 commit 47ceaad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/react/src/components/DatePicker/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,7 @@ const DatePicker = React.forwardRef(function DatePicker(
document.activeElement === endInputField.current &&
calendarRef.current.isOpen
) {
event.preventDefault();
calendarRef.current.close();
// Remove focus from endDate calendar input
document.activeElement instanceof HTMLElement && // this is to fix the TS warning
Expand Down

0 comments on commit 47ceaad

Please sign in to comment.