]> source.dussan.org Git - jquery-ui.git/commitdiff
Dialog: fix small memory leak when having lot's of instances. Fixes #7793 - Small...
authorFlorian Gutmann <blackfeet@gmx.at>
Fri, 14 Oct 2011 15:12:21 +0000 (18:12 +0300)
committerScott González <scott.gonzalez@gmail.com>
Fri, 14 Oct 2011 15:18:48 +0000 (11:18 -0400)
ui/jquery.ui.dialog.js

index 065d640fb313e7516aef3fcb8203c638db096046..46320426a2244014c6a05f15b3f07e30c5416684 100644 (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();