Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/nine-masks-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@digdir/designsystemet-react": patch
"@digdir/designsystemet-web": patch
---

**Popover:** now correctly calculates width of source element also in Firefox
2 changes: 1 addition & 1 deletion packages/web/src/popover/popover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function handleToggle(
size({
apply({ availableHeight }) {
if (overscroll === 'fit')
el.style.width = `${source.clientWidth}px`;
el.style.width = `${source.offsetWidth}px`; // Use offsetWidth to include padding, matching the width of the source element
el.style.maxHeight = `${Math.max(50, availableHeight - padding * 2)}px`;
},
}),
Expand Down
Loading