From 607819f053113a21cccfbc97d775551ef11bfc4a Mon Sep 17 00:00:00 2001 From: Westbrook Johnson Date: Tue, 30 Apr 2024 10:35:49 -0400 Subject: [PATCH] fix(overlay): prevent "receivesFocus=false" overlays from returning focus --- packages/overlay/src/Overlay.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/overlay/src/Overlay.ts b/packages/overlay/src/Overlay.ts index fe40bf4528..4a76ee32e5 100644 --- a/packages/overlay/src/Overlay.ts +++ b/packages/overlay/src/Overlay.ts @@ -393,6 +393,7 @@ export class Overlay extends OverlayFeatures { return ancestors; }; if ( + this.receivesFocus !== 'false' && (this.triggerElement as HTMLElement)?.focus && (this.contains((this.getRootNode() as Document).activeElement) || getAncestors().includes(this) ||