             labelEditor().checkbox.tooltip('destroy')
             labelEditor().container.hide()
             # Update values in the DOM, without waiting for the server to send us the value
-            currentLabel.text(newLabel)
+            currentLabel.html(newLabel)
             setLabelHtml(isChecked)
 
     # Heuristic to close the editor based on click and focus events
     clickOrFocus = ({target}) ->
         target = $(target)
-        eventOnEditor = labelEditor().textfield.is(target) or labelEditor().checkbox.is(target)
-        eventOnControlLabel = target.is('.xforms-label') && target.parents('.fb-main').is('*')
+        eventOnEditor = labelEditor().textfield.is(target) || labelEditor().checkbox.is(target)
+        eventOnControlLabel =
+            # Click on label or element inside label
+            (target.is('.xforms-label') || target.parents('.xforms-label').is('*')) &&
+            # Only interested in labels in the "editor" portion of FB
+            target.parents('.fb-main').is('*')
         endEdit() unless eventOnEditor or eventOnControlLabel
 
     # Returns a <div> which contains the text field and checkbox

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

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

        editor

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