                         widget.options.editable.element.blur()
                         widget.hideOverlay()
 
+                jQuery(window).resize ()->
+                    if widget.options.visible
+                        widget.updateOverlay(true)
+
         _init: ->
 
         showOverlay: ->


                @options.pieces.left.css
                    height: m.editableHeight - @options.offsetTop - @options.offsetBottom

                @options.pieces.right.css
                    height: m.editableHeight - @options.offsetTop - @options.offsetBottom

                @options.pieces.bottom.css
                    top: m.editableTop + m.editableHeight - @options.offsetBottom


            @options.editable._deactivated {data: @options.editable}

        # To prevent performance issue, we only allow the update if the last update did not occure
        # a few millieconds ago (see options.updateInterval)
        # Pass true as first argument if you want to force the update
        updateOverlay: (force) ->
            now = new Date().getTime();
            # trying to avoid performance issue
            if !force and @options.lastUpdate and now - @options.lastUpdate < @options.updateInterval
                return

            @options.lastUpdate = now
