From ea26b8d42b258835511153ffc09776bfd1aa7ab6 Mon Sep 17 00:00:00 2001 From: has2k1 Date: Sat, 30 Jul 2011 17:44:26 -0600 Subject: Prevent bookmark completion box from overflowing. Happens when the partial string input matches more results than can be displayed vertically. This causes the input section at the top, together with the top matching URLS to disappear. Solution is to only center the box when it's height is less than the window height, otherwise it's top is at coordinate 0. No negative top.--- completionDialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/completionDialog.js b/completionDialog.js index 1b2d3646..7413d05a 100644 --- a/completionDialog.js +++ b/completionDialog.js @@ -118,7 +118,7 @@ } } - container.style.top=(window.innerHeight/2-container.clientHeight/2) + "px"; + container.style.top=Math.max(0,(window.innerHeight/2-container.clientHeight/2)) + "px"; container.style.left=(window.innerWidth/2-container.clientWidth/2) + "px"; } }; -- cgit v1.2.3