1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 13:32:27 +01:00

Try to find a text node in the middle of the viewport first when there's no selection.

This commit is contained in:
Kris Maglione
2011-10-03 21:41:25 -04:00
parent d3b647df42
commit 3600f41f1f

View File

@@ -516,7 +516,7 @@ var Buffer = Module("Buffer", {
rect = { x: rect.left, y: 0, width: rect.width, height: win.innerHeight }; rect = { x: rect.left, y: 0, width: rect.width, height: win.innerHeight };
} }
else { else {
rect = { x: 0, y: 0, width: win.innerWidth, height: 0 }; rect = { x: win.innerWidth / 2, y: 0, width: 0, height: 0 };
} }
var reduce = function (a, b) DOM(a).rect.top < DOM(b).rect.top ? a : b; var reduce = function (a, b) DOM(a).rect.top < DOM(b).rect.top ? a : b;