Skip to content

Commit

Permalink
fix: place confirm-dialog footer correctly when height is set (#8678)
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan authored Feb 14, 2025
1 parent b0a16c6 commit 62a0c6d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export const confirmDialogOverlay = css`
height: var(--_vaadin-confirm-dialog-content-height);
}
#resizerContainer {
height: 100%;
}
::slotted([slot='header']) {
pointer-events: auto;
}
Expand Down
8 changes: 8 additions & 0 deletions packages/confirm-dialog/test/confirm-dialog.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,14 @@ describe('vaadin-confirm-dialog', () => {
await nextFrame();
expect(overlay.getAttribute('style')).to.be.not.ok;
});

it('should place footer part at the bottom of the overlay', async () => {
confirm._contentHeight = '500px';
await nextFrame();
const footer = overlay.$.overlay.querySelector('[part="footer"]');
const overlayRect = overlay.$.overlay.getBoundingClientRect();
expect(footer.getBoundingClientRect().bottom).to.be.closeTo(overlayRect.bottom, 0.1);
});
});

describe('before attach', () => {
Expand Down

0 comments on commit 62a0c6d

Please sign in to comment.