From 34db3355732b64945006664bbb7557c486b8b213 Mon Sep 17 00:00:00 2001 From: Nikhil Tomar Date: Fri, 13 Sep 2024 01:12:25 +0530 Subject: [PATCH] fix(17398): fix focus order in firefox --- packages/react/src/components/DatePicker/DatePicker.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react/src/components/DatePicker/DatePicker.tsx b/packages/react/src/components/DatePicker/DatePicker.tsx index 20d37d73b5c9..fd07b48c8964 100644 --- a/packages/react/src/components/DatePicker/DatePicker.tsx +++ b/packages/react/src/components/DatePicker/DatePicker.tsx @@ -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