       return true
 
     # Find the start and end TextNode nodes.
-    start = findNode(from, to, checkNode, postFirst)
-    end = findNode(to, from, checkNode, postLast)
+    start = findNode(startContainer, last, checkNode, preFirst)
+    end = findNode(endContainer, first, checkNode, preLast)
 
     return new NormalizedRange({commonAncestor, start, end})
 

      endContainer = firstLeaf(endContainer.childNodes[endOffset])
      endOffset = 0

    # These above implies that a post-order traversal visits every Node in the
    # Range before visiting the end container. The first Node in the order is
    # the first leaf of the start container.
    from = firstLeaf(startContainer)

    # Similarly, a post-order traversal that reverses the child order visits
    # every Node in the Range before visiting the end container. The first
    # Node in the order is the last leaf of the start container.
    to = lastLeaf(endContainer)

    # Any TextNode in the traversal is valid unless excluded by the offset.
    checkNode = (node) ->


    document = bounds.ownerDocument

    first = firstLeaf(bounds)
    last = lastLeaf(bounds)

    if not contains(bounds, @start)
      @start = findNode(bounds, last, isTextNode, preFirst)

    if not contains(bounds, @end)
      @end = findNode(bounds, first, isTextNode, preLast)

    return null unless @start and @end

