mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 07:48:02 +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:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user