@@ -25,6 +25,10 @@ import themes from 'ui/themes';
25
25
import executeAsyncMock from '../../helpers/executeAsyncMock.js' ;
26
26
import visibilityChangeUtils from 'events/visibility_change' ;
27
27
import domAdapter from 'core/dom_adapter' ;
28
+ import {
29
+ TEMPLATE_WRAPPER_CLASS ,
30
+ POPUP_CONTENT_SCROLLABLE_CLASS ,
31
+ } from '__internal/ui/popup/m_popup' ;
28
32
29
33
import 'generic_light.css!' ;
30
34
import 'ui/popup' ;
@@ -37,7 +41,6 @@ const IS_IOS_DEVICE = devices.real().platform === 'ios';
37
41
const IS_OLD_SAFARI = IS_SAFARI && compareVersions ( browser . version , [ 11 ] ) < 0 ;
38
42
const PREVENT_SAFARI_SCROLLING_CLASS = 'dx-prevent-safari-scrolling' ;
39
43
40
- const POPUP_CONTENT_SCROLLABLE_CLASS = 'dx-popup-content-scrollable' ;
41
44
const TOOLBAR_LABEL_CLASS = 'dx-toolbar-label' ;
42
45
43
46
themes . setDefaultTimeout ( 0 ) ;
@@ -694,7 +697,7 @@ QUnit.module('dimensions', {
694
697
'title' : {
695
698
render : function ( args ) {
696
699
const $element = $ ( '<span>' )
697
- . addClass ( 'dx-template-wrapper' )
700
+ . addClass ( TEMPLATE_WRAPPER_CLASS )
698
701
. text ( 'text' ) ;
699
702
700
703
return $element . get ( 0 ) ;
@@ -1094,6 +1097,25 @@ QUnit.module('options changed callbacks', {
1094
1097
assert . strictEqual ( minHeight , '0px' , 'minHeight is inherited correctly' ) ;
1095
1098
} ) ;
1096
1099
1100
+ QUnit . test ( 'Template wrapper element uses "display: flow-root" to prevent the appearance of scrollbar (T1253645)' , function ( assert ) {
1101
+ const popup = $ ( '#popup' ) . dxPopup ( {
1102
+ visible : true ,
1103
+ width : 300 ,
1104
+ height : 300 ,
1105
+ showTitle : false ,
1106
+ contentTemplate ( ) {
1107
+ return $ ( '<div>' )
1108
+ . addClass ( TEMPLATE_WRAPPER_CLASS )
1109
+ . append ( '<p>test content</p>' ) ;
1110
+ }
1111
+ } ) . dxPopup ( 'instance' ) ;
1112
+
1113
+ const $templateWrapper = popup . $content ( ) . find ( `.${ TEMPLATE_WRAPPER_CLASS } ` ) ;
1114
+ const overflow = $templateWrapper . css ( 'display' ) ;
1115
+
1116
+ assert . strictEqual ( overflow , 'flow-root' , 'overflow property is set to hidden' ) ;
1117
+ } ) ;
1118
+
1097
1119
QUnit . test ( 'popup height should support TreeView with Search if height = auto (T724029)' , function ( assert ) {
1098
1120
if ( IS_OLD_SAFARI ) {
1099
1121
assert . expect ( 0 ) ;
0 commit comments