1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-08 02:54:12 +01:00

Show function prototype when completing JavaScript function arguments.

This commit is contained in:
Kris Maglione
2010-09-24 20:58:52 -04:00
parent 223859a33b
commit 7c410ca905
4 changed files with 28 additions and 11 deletions

View File

@@ -671,7 +671,7 @@ const Util = Module("Util", {
scrollIntoView: function scrollIntoView(elem, alignWithTop) {
let win = elem.ownerDocument.defaultView;
let rect = elem.getBoundingClientRect();
if (!(rect && rect.bottom <= win.innerHeight && rect.top >= 0 && rect.right <= win.innerWidth && rect.left >= 0))
if (!(rect && rect.bottom <= win.innerHeight && rect.top >= 0 && rect.left < win.innerWidth && rect.right > 0))
elem.scrollIntoView(arguments.length > 1 ? alignWithTop : Math.abs(rect.top) < Math.abs(win.innerHeight - rect.bottom));
},