1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-07 23:34:11 +01:00

Try to move the caret within the viewport on entering Caret or Find mode. Closes issue #170.

This commit is contained in:
Kris Maglione
2011-10-03 21:11:26 -04:00
parent b19375d109
commit 654cf64c02
7 changed files with 93 additions and 9 deletions

View File

@@ -326,7 +326,13 @@ var DOM = Class("DOM", {
}),
}),
get rect() this[0] ? this[0].getBoundingClientRect() : {},
get rect() this[0] instanceof Ci.nsIDOMWindow ? { get width() this.innerWidth,
get height() this.innerHeight,
get bottom() this.height,
get right() this.width,
top: 0, left: 0,
__proto__: this[0] } :
this[0] ? this[0].getBoundingClientRect() : {},
get viewport() {
let r = this.rect;