1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-27 06:15:54 +01:00

Add a hint mode for selecting scrollable elements.

Update issue 151
This should do what you want.
This commit is contained in:
Kris Maglione
2010-12-02 20:29:51 -05:00
parent 9a9449f554
commit 0346a1ff18
5 changed files with 46 additions and 14 deletions

View File

@@ -642,6 +642,9 @@ const RangeFind = Class("RangeFind", {
contains: function (range, r)
range.compareBoundaryPoints(range.START_TO_END, r) >= 0 &&
range.compareBoundaryPoints(range.END_TO_START, r) <= 0,
intersects: function (range, r)
r.compareBoundaryPoints(range.START_TO_END, range) >= 0 &&
r.compareBoundaryPoints(range.END_TO_START, range) <= 0,
endpoint: function (range, before) {
range = range.cloneRange();
range.collapse(before);