From f76532ac360512a3a70790268256578ded7e0334 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 20 Dec 2017 14:08:33 +0300 Subject: [PATCH] Fix tip position when the bottom of the tip is greater then browser height. --- apps/common/main/lib/util/Tip.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/common/main/lib/util/Tip.js b/apps/common/main/lib/util/Tip.js index 9a197eee0..f4ce19e4a 100644 --- a/apps/common/main/lib/util/Tip.js +++ b/apps/common/main/lib/util/Tip.js @@ -154,11 +154,15 @@ if (typeof at == 'object') { var tp = {top: at[1] + 15, left: at[0] + 18}, - innerWidth = Common.Utils.innerWidth(); + innerWidth = Common.Utils.innerWidth(), + innerHeight = Common.Utils.innerHeight(); if (tp.left + $tip.width() > innerWidth) { tp.left = innerWidth - $tip.width() - 30; } + if (tp.top + $tip.height() > innerHeight) { + tp.top = innerHeight - $tip.height() - 30; + } $tip.offset(tp).addClass('in'); } else {