             if @options.overlay is null
                 if jQuery("#halloOverlay").length > 0
                     @options.overlay = jQuery("#halloOverlay")
-                    @options.overlay.bind 'click', jQuery.proxy @hideOverlay, @
                 else
                     @options.overlay = jQuery('<div id="halloOverlay" class="halloOverlay">')
                     jQuery(document.body).append @options.overlay
-                    @options.overlay.bind 'click', jQuery.proxy @hideOverlay, @
+
+                @options.overlay.bind 'click', jQuery.proxy(@options.editable.turnOff, @options.editable)
 
             @options.overlay.show()
 

                @options.bound = true
                widget.options.editable.element.bind "halloactivated", (event, data) ->
                    widget.options.currentEditable = jQuery(event.target)
                    widget.showOverlay()

                # abort editing when pressing ESCAPE --- This should be covered in hallo core, it is just not working yet
                widget.options.editable.element.keydown (event, data) ->
                    if event.keyCode == 27
                        widget.options.editable.restoreOriginalContent()
                        widget.options.editable.element.blur()
                        widget.hideOverlay()

        _init: ->

            @options.currentEditable.css 'background-color', @options.originalBgColor
            @options.currentEditable.css 'z-index', @options.originalZIndex

        # Find the closest parent having a background color. If none, returns white.
        _findBackgroundColor: (jQueryfield) ->
            color = jQueryfield.css "background-color"
