         index = Number(index)
         offset = Number(offset)
         if node.nodeType is Node.TEXT_NODE
-          offset += containerOffset
+          offset += containerOffset unless nodeIsCursorTarget(node)
         else
           offset += 1 unless containerOffset is 0
         return {index, offset}

    node = null
    for offset, nodes of @getNodeRecords()[location.index]
      candidate = nodes[nodes.length - 1]
      if offset > location.offset
        break
      node = candidate
      if offset is location.offset and candidate.nodeType is Node.TEXT_NODE and candidate.textContent is Trix.ZERO_WIDTH_SPACE
        break
    node

  getLocationRangeAtPoint: ([clientX, clientY]) ->

        clientY -= document.body.scrollTop

      [clientX, clientY]

  nodeIsCursorTarget = (node) ->
    return unless node
    if node.nodeType is Node.TEXT_NODE
      node.textContent is Trix.ZERO_WIDTH_SPACE
    else
      nodeIsCursorTarget(node.firstChild)

  getDOMSelection = ->
    selection = window.getSelection()
