From df1ec9ff3c1d3fe0f74be26f9fa81bd73d579357 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Tue, 30 Jun 2015 02:05:41 -0500 Subject: [PATCH] Make sure popups are on-screen --- js/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/client.js b/js/client.js index b1ff15168..68176af31 100644 --- a/js/client.js +++ b/js/client.js @@ -2041,7 +2041,7 @@ (offset.top + sourceHeight < room * 2/3 || offset.top + sourceHeight + 200 < room)) { $el.css('top', offset.top + sourceHeight); } else if (height + 5 <= offset.top) { - $el.css('bottom', room - offset.top); + $el.css('bottom', Math.max(room - offset.top, 0)); } else if (height + 10 < room) { $el.css('bottom', 5); } else {