[w3c/selection-api] containsNode could return true for a node that doesn't intersect the selection at all (#116)

"If allowPartialContainment is true, the method must return true if and only if start of its range is before or visually equivalent to the first boundary point in the node or end of its range is after or visually equivalent to the last boundary point in the node. " is not what this should say.

Suppose I have nodes ABC in that order, I've selected AB, and I'm asking containsNode("C",true). The start if its range is before C, so by this phrasing I should return true.

"If allowPartialContainment is true, the method must return true if and only if start of its range is before or visually equivalent to the _last_ boundary point in the node _and_ end of its range is after or visually equivalent to the _first_ boundary point in the node. " might be correct, but I haven't thought about it deeply enough to be sure.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/selection-api/issues/116

Received on Saturday, 1 February 2020 02:19:41 UTC