Dialog: fix small memory leak when having lot's of instances. Fixes #7793 - Small memory leak in ui dialog.

This commit is contained in:
Florian Gutmann 2011-10-14 18:12:21 +03:00 committed by Scott González
parent 26bcf972e6
commit 42d33f2f86

View File

@ -715,12 +715,11 @@ $.extend( $.ui.dialog.overlay, {
$( window ).bind( "resize.dialog-overlay", $.ui.dialog.overlay.resize );
}
var $el = ( this.oldInstances.pop() || $( "<div>" ).addClass( "ui-widget-overlay" ) )
.appendTo( document.body )
.css({
width: this.width(),
height: this.height()
});
var $el = ( this.oldInstances.pop() || $( "<div>" ).addClass( "ui-widget-overlay" ) );
$el.appendTo( document.body ).css({
width: this.width(),
height: this.height()
});
if ( $.fn.bgiframe ) {
$el.bgiframe();