Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popup: template wrapper element inherits maxHeight and minHeight styles from parent when popup dimensions are auto (T1259619) #28728

Merged
merged 1 commit into from
Jan 17, 2025
Merged
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
2 changes: 1 addition & 1 deletion packages/devextreme-scss/scss/widgets/base/_popup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
.dx-popup-inherit-height & {
@include dx-popup-content-auto-resizing();

> .dx-template-wrapper {
> div {
max-height: inherit;
min-height: inherit;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,26 @@ QUnit.module('options changed callbacks', {
assert.ok($popup.hasClass(POPUP_CONTENT_INHERIT_HEIGHT_CLASS), 'has POPUP_CONTENT_INHERIT_HEIGHT_CLASS with auto width');
});

QUnit.test('template wrapper element inherits maxHeight and minHeight styles from parent when popup dimensions are auto (T1259619)', function(assert) {
const popup = $('#popup').dxPopup({
visible: true,
height: 'auto',
width: 'auto',
showTitle: false,
contentTemplate() {
return $('<div>')
.addClass('templateWrapper')
.text('testContent');
}
}).dxPopup('instance');

const $templateWrapper = popup.$content().find('.templateWrapper');
const maxHeight = $templateWrapper.css('maxHeight');
const minHeight = $templateWrapper.css('minHeight');

assert.strictEqual(maxHeight, 'none', 'maxHeight is inherited correctly');
assert.strictEqual(minHeight, '0px', 'minHeight is inherited correctly');
});

QUnit.test('popup height should support TreeView with Search if height = auto (T724029)', function(assert) {
if(IS_OLD_SAFARI) {
Expand Down
Loading