Skip to content

Commit

Permalink
Popup: template wrapper element inherits maxHeight and minHeight styl…
Browse files Browse the repository at this point in the history
…es from parent when popup dimensions are auto (T1259619)
  • Loading branch information
EugeniyKiyashko committed Jan 15, 2025
1 parent 2f4cacb commit 7875dd4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
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

0 comments on commit 7875dd4

Please sign in to comment.