aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhas2k12011-07-30 17:44:26 -0600
committerhas2k12011-07-30 17:44:26 -0600
commitea26b8d42b258835511153ffc09776bfd1aa7ab6 (patch)
treebf1cbcbf68ebbfa6c2dd83c2829be3a62b00bfac
parent2b94c0df13cc55ec062a314f9844b273d375de08 (diff)
downloadvimium-ea26b8d42b258835511153ffc09776bfd1aa7ab6.tar.bz2
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.
-rw-r--r--completionDialog.js2
1 files changed, 1 insertions, 1 deletions
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";
}
};