From 9be0cbcc5b74ab421b4b0fc8f203a1d48eef5826 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 21 Mar 2019 13:22:48 +0300 Subject: [PATCH] For Bug 40746 --- apps/common/main/lib/component/LoadMask.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/common/main/lib/component/LoadMask.js b/apps/common/main/lib/component/LoadMask.js index abd38b62d..2d5801b6e 100644 --- a/apps/common/main/lib/component/LoadMask.js +++ b/apps/common/main/lib/component/LoadMask.js @@ -130,6 +130,8 @@ define([ left: Math.round(ownerEl.width() / 2 - (loaderEl.width() + parseInt(loaderEl.css('padding-left')) + parseInt(loaderEl.css('padding-right'))) / 2) + 'px' }); + if (ownerEl.height()<1 || ownerEl.width()<1) + loaderEl.css({visibility: 'hidden'}); Common.util.Shortcuts.suspendEvents(); @@ -163,8 +165,8 @@ define([ loaderEl.css({ top : Math.round(ownerEl.height() / 2 - (loaderEl.height() + parseInt(loaderEl.css('padding-top')) + parseInt(loaderEl.css('padding-bottom'))) / 2) + 'px', left: Math.round(ownerEl.width() / 2 - (loaderEl.width() + parseInt(loaderEl.css('padding-left')) + parseInt(loaderEl.css('padding-right'))) / 2) + 'px' - }); + loaderEl.css({visibility: 'visible'}); } } }