@@ -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 ) ;
@@ -1074,6 +1077,25 @@ QUnit.module('options changed callbacks', {
1074
1077
} ) ;
1075
1078
1076
1079
1080
+ QUnit . test ( 'Template wrapper element uses "display: flow-root" to prevent the appearance of scrollbar (T1253645)' , function ( assert ) {
1081
+ const popup = $ ( '#popup' ) . dxPopup ( {
1082
+ visible : true ,
1083
+ width : 300 ,
1084
+ height : 300 ,
1085
+ showTitle : false ,
1086
+ contentTemplate ( ) {
1087
+ return $ ( '<div>' )
1088
+ . addClass ( TEMPLATE_WRAPPER_CLASS )
1089
+ . append ( '<p>test content</p>' ) ;
1090
+ }
1091
+ } ) . dxPopup ( 'instance' ) ;
1092
+
1093
+ const $templateWrapper = popup . $content ( ) . find ( `.${ TEMPLATE_WRAPPER_CLASS } ` ) ;
1094
+ const overflow = $templateWrapper . css ( 'display' ) ;
1095
+
1096
+ assert . strictEqual ( overflow , 'flow-root' , 'overflow property is set to hidden' ) ;
1097
+ } ) ;
1098
+
1077
1099
QUnit . test ( 'popup height should support TreeView with Search if height = auto (T724029)' , function ( assert ) {
1078
1100
if ( IS_OLD_SAFARI ) {
1079
1101
assert . expect ( 0 ) ;
0 commit comments