From 3600f41f1f70a60c3238f5c721b8a674ff08a77d Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Mon, 3 Oct 2011 21:41:25 -0400 Subject: [PATCH] Try to find a text node in the middle of the viewport first when there's no selection. --- common/modules/buffer.jsm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/modules/buffer.jsm b/common/modules/buffer.jsm index cdc2a179..2af2c102 100644 --- a/common/modules/buffer.jsm +++ b/common/modules/buffer.jsm @@ -516,7 +516,7 @@ var Buffer = Module("Buffer", { rect = { x: rect.left, y: 0, width: rect.width, height: win.innerHeight }; } 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;