From 79c59acd0d2ec4a0c9e9cd8aed3a7bde629d57e1 Mon Sep 17 00:00:00 2001 From: jbpenrath Date: Mon, 17 Mar 2025 15:47:09 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(react)=20fix=20DateRangePicker=20i?= =?UTF-8?q?ssue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We encountered a bug with the date range picker due to an internal logic of `@react-aria/calendar`. This bug silently came back recently but our test suite does not trigger that but since the update of `@testing-library/user-event` a test starts to fail and highlight this issue so we fix again this bug. https://github.com/adobe/react-spectrum/commit/12f2f4e --- .changeset/fair-lizards-tie.md | 5 +++++ .../src/components/Forms/DatePicker/Calendar.tsx | 16 ++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 .changeset/fair-lizards-tie.md diff --git a/.changeset/fair-lizards-tie.md b/.changeset/fair-lizards-tie.md new file mode 100644 index 0000000..0bc1eca --- /dev/null +++ b/.changeset/fair-lizards-tie.md @@ -0,0 +1,5 @@ +--- +"@openfun/cunningham-react": patch +--- + +Fix a bug DateRangePicker that could close popover abruptly diff --git a/packages/react/src/components/Forms/DatePicker/Calendar.tsx b/packages/react/src/components/Forms/DatePicker/Calendar.tsx index f5203c1..0752bae 100644 --- a/packages/react/src/components/Forms/DatePicker/Calendar.tsx +++ b/packages/react/src/components/Forms/DatePicker/Calendar.tsx @@ -233,24 +233,20 @@ const CalendarAux = ({ return (