@@ -25,6 +25,10 @@ import themes from 'ui/themes';
2525import executeAsyncMock from '../../helpers/executeAsyncMock.js' ;
2626import visibilityChangeUtils from 'events/visibility_change' ;
2727import domAdapter from 'core/dom_adapter' ;
28+ import {
29+ TEMPLATE_WRAPPER_CLASS ,
30+ POPUP_CONTENT_SCROLLABLE_CLASS ,
31+ } from '__internal/ui/popup/m_popup' ;
2832
2933import 'generic_light.css!' ;
3034import 'ui/popup' ;
@@ -37,7 +41,6 @@ const IS_IOS_DEVICE = devices.real().platform === 'ios';
3741const IS_OLD_SAFARI = IS_SAFARI && compareVersions ( browser . version , [ 11 ] ) < 0 ;
3842const PREVENT_SAFARI_SCROLLING_CLASS = 'dx-prevent-safari-scrolling' ;
3943
40- const POPUP_CONTENT_SCROLLABLE_CLASS = 'dx-popup-content-scrollable' ;
4144const TOOLBAR_LABEL_CLASS = 'dx-toolbar-label' ;
4245
4346themes . setDefaultTimeout ( 0 ) ;
@@ -694,7 +697,7 @@ QUnit.module('dimensions', {
694697 'title' : {
695698 render : function ( args ) {
696699 const $element = $ ( '<span>' )
697- . addClass ( 'dx-template-wrapper' )
700+ . addClass ( TEMPLATE_WRAPPER_CLASS )
698701 . text ( 'text' ) ;
699702
700703 return $element . get ( 0 ) ;
@@ -1074,6 +1077,25 @@ QUnit.module('options changed callbacks', {
10741077 } ) ;
10751078
10761079
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+
10771099 QUnit . test ( 'popup height should support TreeView with Search if height = auto (T724029)' , function ( assert ) {
10781100 if ( IS_OLD_SAFARI ) {
10791101 assert . expect ( 0 ) ;
0 commit comments