From df15177b1493556b0ee1cd2bebb7289e67d285f4 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Thu, 16 May 2013 15:01:32 -0500 Subject: [PATCH] Make sure popups don't stretch layout --- js/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/client.js b/js/client.js index d6f0fe9b9..821f31b9c 100644 --- a/js/client.js +++ b/js/client.js @@ -1380,7 +1380,7 @@ (offset.top < room * 2/3 || offset.top + 200 < room)) { $el.css('top', offset.top); } else { - $el.css('bottom', room - offset.top - sourceHeight); + $el.css('bottom', Math.max(room - offset.top - sourceHeight, 0)); } $el.css('left', offset.left + this.sourceEl.outerWidth());