         editor
 
     # Show editor on click on label
-    startEdit = ({target}) ->
-        currentLabel = $(target)
+    startEdit = ({currentTarget}) ->
+        currentLabel = $(currentTarget)
         # Find control for this label
         th = currentLabel.parents('th')
         currentControl =

                # Case of a repeat
                trWithControls = th.parents('table').find('tbody tr.fb-grid-tr').first()
                tdWithControl = trWithControls.children(':nth-child(' + (th.index() + 1) + ')')
                tdWithControl.find('.xforms-control, .xbl-component').first()
            else
                currentLabel.parent('.xforms-control, .xbl-component')
        # Remove `for` so browser doesn't set the focus to the control on click
        currentLabel.removeAttr('for')
        # Setup tooltip for editor (don't do this once for all, as the language can change)

        labelEditor().container.show()
        labelEditor().container.offset(currentLabel.offset())
        labelEditor().textfield.outerWidth(currentLabel.outerWidth() - labelEditor().checkbox.outerWidth(true))
        labelEditor().textfield.val(currentLabel.html()).focus()
        labelEditor().checkbox.prop('checked', isLabelHtml())

    $('.fb-main').on('click', '.xforms-label', startEdit)
