First, I can’t put the demo in jsFiddle because it’s too big.
Demo
Double click configurations icon to open the window, now if you resize the window, the content overflow, if you resize again it’s ok, and so on. Why is this issue? (resize works once and once not..)
Here is the relevant code:
Resize event handler:
$('.window-container').live('resize', function(){
var window = $(this).data('window');
window.setWidth(window.windowContainer.width());
window.setHeight(window.windowContainer.height());
window.repaint();
});
Repaint method (only the relevant code):
JWindow.prototype.repaint = function(){
this.windowContainer.hide();
if (this._visible && !this._minimized) this.windowContainer.show();
this.windowContainer.css('position', 'abosolute');
this.windowContainer.css('left', this.getLeft());
this.windowContainer.css('top', this.getTop());
//Resizable
this.windowContainer.resizable('disable');
if (this._resizable){
this.windowContainer.resizable({
containment: 'parent',
ghost: true,
animate: false,
minHeight:100,
minWidth:this.titleLabel.textWidth()+120
});
this.windowContainer.resizable('enable');
}
this.windowContentContainer.css('height',this.windowContainer.innerHeight()-this.titleBarContainer.height()-20);
}
Well, this is not really a correct answer, I was unable to figure out the issue, so I recoded all the resize code..