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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user