Skip to content
Merged
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
11 changes: 5 additions & 6 deletions src/components/popover/popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,9 @@ export class ChPopover {
) => {
if (this.inlineSizeMatch === "action-element-as-minimum") {
setProperty(this.el, POPOVER_MIN_INLINE_SIZE, actionRect.width);
return actionRect.width;

// TODO: Add e2e tests for this
return Math.max(actionRect.width, popoverRect.width);
}

// Size is determined by the content
Expand All @@ -825,12 +827,9 @@ export class ChPopover {
) => {
if (this.blockSizeMatch === "action-element-as-minimum") {
setProperty(this.el, POPOVER_MIN_BLOCK_SIZE, actionRect.height);
return actionRect.height;
}

// Size is determined by the content
if (this.#resizeWasMade || this.blockSizeMatch === "content") {
return popoverRect.height;
// TODO: Add e2e tests for this
return Math.max(actionRect.height, popoverRect.height);
}

// Size is the same as the `actionElement`
Expand Down
Loading