From fb0813bc6d5686b048f7dc6c8c0acc09a38a66bf Mon Sep 17 00:00:00 2001 From: Thijs Louisse Date: Tue, 29 Jul 2025 15:13:37 +0200 Subject: [PATCH] fix(overlays): don't use hidesOnOutsideEsc in configs, as it disallows nested overlays (a11y concern) --- .changeset/gorgeous-chefs-fly.md | 5 +++++ .../overlays/src/configurations/withDropdownConfig.js | 1 - .../overlays/src/configurations/withTooltipConfig.js | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .changeset/gorgeous-chefs-fly.md diff --git a/.changeset/gorgeous-chefs-fly.md b/.changeset/gorgeous-chefs-fly.md new file mode 100644 index 000000000..4cdb7ecd5 --- /dev/null +++ b/.changeset/gorgeous-chefs-fly.md @@ -0,0 +1,5 @@ +--- +'@lion/ui': minor +--- + +[overlays]: don't use hidesOnOutsideEsc in configs, as it disallows nested overlays (a11y concern) diff --git a/packages/ui/components/overlays/src/configurations/withDropdownConfig.js b/packages/ui/components/overlays/src/configurations/withDropdownConfig.js index 3c2aac95e..b315402f9 100644 --- a/packages/ui/components/overlays/src/configurations/withDropdownConfig.js +++ b/packages/ui/components/overlays/src/configurations/withDropdownConfig.js @@ -9,7 +9,6 @@ export const withDropdownConfig = () => placementMode: 'local', inheritsReferenceWidth: 'min', hidesOnOutsideClick: true, - hidesOnOutsideEsc: true, hidesOnEsc: true, popperConfig: { placement: 'bottom-start', diff --git a/packages/ui/components/overlays/src/configurations/withTooltipConfig.js b/packages/ui/components/overlays/src/configurations/withTooltipConfig.js index 31280fae3..266f00aec 100644 --- a/packages/ui/components/overlays/src/configurations/withTooltipConfig.js +++ b/packages/ui/components/overlays/src/configurations/withTooltipConfig.js @@ -18,7 +18,6 @@ export const withTooltipConfig = ({ placementMode: 'local', elementToFocusAfterHide: undefined, hidesOnEsc: true, - hidesOnOutsideEsc: true, handlesAccessibility: true, isTooltip: true, invokerRelation,