     @container.appendChild(cursor)
     return cursor
 
-  _moveCursor: (cursor, referenceNode) ->
-    cursor.elem.style.top = referenceNode.offsetTop + 'px'
-    cursor.elem.style.left = referenceNode.offsetLeft + 'px'
-    cursor.elem.style.height = referenceNode.offsetHeight + 'px'
+  _moveCursor: (cursor, reference, side = 'left') ->
+    bounds = reference.getBoundingClientRect()
+    cursor.elem.style.top = bounds.top + 'px'
+    cursor.elem.style.left = bounds[side] + 'px'
+    cursor.elem.style.height = bounds.height + 'px'
     flag = cursor.elem.querySelector('.cursor-flag')
     DOM.toggleClass(cursor.elem, 'top', parseInt(cursor.elem.style.top) <= flag.offsetHeight)
     DOM.toggleClass(cursor.elem, 'left', parseInt(cursor.elem.style.left) <= flag.offsetWidth)

    @cursors = {}
    @container = @quill.addContainer('cursor-container', true)
    @quill.addStyles(
      '.cursor-container': { 'position': 'absolute', 'z-index': '1000' }
      '.cursor': { 'margin-left': '-1px', 'position': 'absolute' }
      '.cursor-flag':
        'bottom': '100%'

      '.cursor.hidden .cursor-flag': { 'display': 'none' }
      '.cursor.top > .cursor-flag': { 'bottom': 'auto', 'top': '100%' }
      '.cursor.right > .cursor-flag': { 'right': '-2px' }
    )
    @quill.on(@quill.constructor.events.TEXT_CHANGE, _.bind(this._applyDelta, this))

