From b90f49920d03f9abd2768291f1e4d29a68a64a0e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 23 Nov 2021 23:30:41 +0300 Subject: [PATCH] Fix Bug 50498 --- apps/common/main/lib/component/SynchronizeTip.js | 8 +++++++- apps/common/main/resources/less/synchronize-tip.less | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/common/main/lib/component/SynchronizeTip.js b/apps/common/main/lib/component/SynchronizeTip.js index c56dd7c46..d44d2fe95 100644 --- a/apps/common/main/lib/component/SynchronizeTip.js +++ b/apps/common/main/lib/component/SynchronizeTip.js @@ -154,8 +154,14 @@ define([ } top = (top!==undefined) ? (top + 'px') : 'auto'; bottom = (bottom!==undefined) ? (bottom + 'px') : 'auto'; - left = (left!==undefined) ? (left + 'px') : 'auto'; right = (right!==undefined) ? (right + 'px') : 'auto'; + if (left!==undefined) { + var width = this.cmpEl.width(); + if (left+width>Common.Utils.innerWidth()) + left = Common.Utils.innerWidth() - width - 10; + left = (left + 'px'); + } else + left = 'auto'; this.cmpEl.css({top : top, left: left, right: right, bottom: bottom}); } }, diff --git a/apps/common/main/resources/less/synchronize-tip.less b/apps/common/main/resources/less/synchronize-tip.less index 31d26e68c..c397cd8dd 100644 --- a/apps/common/main/resources/less/synchronize-tip.less +++ b/apps/common/main/resources/less/synchronize-tip.less @@ -1,5 +1,5 @@ .synch-tip-root { - position: absolute; + position: fixed; z-index: @zindex-navbar + 2; @tip-width: 300px;