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


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

        updateOverlay: ->
            # trying to avoid performance issue
            now = new Date().getTime();
            if @options.lastUpdate and now - @options.lastUpdate < @options.updateInterval
                return

            @options.lastUpdate = now


                @options.pieces.left.css
                    height: m.editableHeight - @options.offsetTop - @options.offsetBottom
                    width: m.editableLeft + @options.offsetLeft

                @options.pieces.right.css
                    height: m.editableHeight - @options.offsetTop - @options.offsetBottom
                    width: m.windowWidth - (m.editableLeft + m.editableWidth) + @options.offsetRight

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