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

        clientY -= document.body.scrollTop

      [clientX, clientY]

  getDOMSelection = ->
    selection = window.getSelection()

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