]> source.dussan.org Git - jquery-ui.git/commitdiff
Resizable: Use .insertAfter() instead of .after() to avoid recursively destroying...
authorScott González <scott.gonzalez@gmail.com>
Sat, 13 Oct 2012 18:50:51 +0000 (14:50 -0400)
committerScott González <scott.gonzalez@gmail.com>
Sat, 13 Oct 2012 18:50:51 +0000 (14:50 -0400)
ui/jquery.ui.resizable.js

index cc82b8b92700628429206aa545133750b9e52be0..c1fd676d97e834ce8a221002be1763ef9f969371 100644 (file)
@@ -204,15 +204,14 @@ $.widget("ui.resizable", $.ui.mouse, {
                if (this.elementIsWrapper) {
                        _destroy(this.element);
                        var wrapper = this.element;
-                       wrapper.after(
-                               this.originalElement.css({
-                                       position: wrapper.css('position'),
-                                       width: wrapper.outerWidth(),
-                                       height: wrapper.outerHeight(),
-                                       top: wrapper.css('top'),
-                                       left: wrapper.css('left')
-                               })
-                       ).remove();
+                       this.originalElement.css({
+                               position: wrapper.css('position'),
+                               width: wrapper.outerWidth(),
+                               height: wrapper.outerHeight(),
+                               top: wrapper.css('top'),
+                               left: wrapper.css('left')
+                       }).insertAfter( wrapper );
+                       wrapper.remove();
                }
 
                this.originalElement.css('resize', this.originalResizeStyle);