Skip to content
Permalink
Browse files

Dialog: fix small memory leak when having lot's of instances. Fixes #…

…7793 - Small memory leak in ui dialog.
  • Loading branch information...
Florian Gutmann authored and scottgonzalez committed Oct 14, 2011
1 parent 26bcf97 commit 42d33f2f86d48f5f82a640a6c57c566a4e84cdda
Showing with 5 additions and 6 deletions.
  1. +5 −6 ui/jquery.ui.dialog.js
@@ -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();

0 comments on commit 42d33f2

Please sign in to comment.
You can’t perform that action at this time.