File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
app/code/Magento/Ui/view/base/web/js/modal
dev/tests/functional/tests/app/Magento/CatalogRule/Test/Page/Adminhtml Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -336,11 +336,12 @@ define([
336
336
* Set z-index and margin for modal and overlay.
337
337
*/
338
338
_setActive : function ( ) {
339
- var zIndex = this . modal . zIndex ( ) ;
339
+ var zIndex = this . modal . zIndex ( ) ,
340
+ baseIndex = zIndex + this . _getVisibleCount ( ) ;
340
341
342
+ this . overlay . zIndex ( ++ baseIndex ) ;
341
343
this . prevOverlayIndex = this . overlay . zIndex ( ) ;
342
- this . modal . zIndex ( zIndex + this . _getVisibleCount ( ) ) ;
343
- this . overlay . zIndex ( zIndex + ( this . _getVisibleCount ( ) - 1 ) ) ;
344
+ this . modal . zIndex ( this . overlay . zIndex ( ) + 1 ) ;
344
345
345
346
if ( this . _getVisibleSlideCount ( ) ) {
346
347
this . modal . css ( 'marginLeft' , this . options . modalLeftMargin * this . _getVisibleSlideCount ( ) ) ;
@@ -354,7 +355,14 @@ define([
354
355
this . modal . removeAttr ( 'style' ) ;
355
356
356
357
if ( this . overlay ) {
357
- this . overlay . zIndex ( this . prevOverlayIndex ) ;
358
+ // In cases when one modal is closed but there is another modal open (e.g. admin notifications)
359
+ // to avoid collisions between overlay and modal zIndexes
360
+ // overlay zIndex is set to be less than modal one
361
+ if ( this . _getVisibleCount ( ) === 1 ) {
362
+ this . overlay . zIndex ( this . prevOverlayIndex - 1 ) ;
363
+ } else {
364
+ this . overlay . zIndex ( this . prevOverlayIndex ) ;
365
+ }
358
366
}
359
367
} ,
360
368
Original file line number Diff line number Diff line change 9
9
<page name =" CatalogRuleNew" area =" Adminhtml" mca =" catalog_rule/promo_catalog/new" module =" Magento_CatalogRule" >
10
10
<block name =" formPageActions" class =" Magento\CatalogRule\Test\Block\Adminhtml\FormPageActions" locator =" .page-main-actions" strategy =" css selector" />
11
11
<block name =" editForm" class =" Magento\CatalogRule\Test\Block\Adminhtml\Promo\Catalog\Edit\PromoForm" locator =" [id='page:main-container']" strategy =" css selector" />
12
- <block name =" modalBlock" class =" Magento\Ui\Test\Block\Adminhtml\Modal" locator =" ._show[data-role=modal][style='z-index: 900 ;']" strategy =" css selector" />
12
+ <block name =" modalBlock" class =" Magento\Ui\Test\Block\Adminhtml\Modal" locator =" ._show[data-role=modal][style='z-index: 902 ;']" strategy =" css selector" />
13
13
</page >
14
14
</config >
You can’t perform that action at this time.
0 commit comments