Skip to content

Commit

Permalink
fix(overlay): prevent "receivesFocus=false" overlays from returning f…
Browse files Browse the repository at this point in the history
…ocus
  • Loading branch information
Westbrook committed May 1, 2024
1 parent 31a1f42 commit 607819f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/overlay/src/Overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) ||
Expand Down

0 comments on commit 607819f

Please sign in to comment.