Skip to content

Commit

Permalink
Remove workaround when setting popover attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
acelaya committed Nov 26, 2024
1 parent 8fef71d commit 82734c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/components/feedback/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,7 @@ export default function Popover({
classes,
)}
ref={popoverRef}
// nb. Use `undefined` rather than `false` because Preact doesn't
// handle boolean values correctly for this attribute (it will set
// `popover="false"` instead of removing the attribute).
popover={asNativePopover ? 'auto' : undefined}
popover={asNativePopover && 'auto'}
data-testid="popover"
data-component="Popover"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export default function PopoverPage() {
<code>boolean</code>
</Library.InfoItem>
<Library.InfoItem label="default">
<code>false</code>
<code>true</code>
</Library.InfoItem>
</Library.Info>
</Library.Example>
Expand Down

0 comments on commit 82734c2

Please sign in to comment.