Skip to content

Commit 025266e

Browse files
committed
Resizable: Use .insertAfter() instead of .after() to avoid recursively destroying. Fixes #8662 - Infinite loop - new to jQuery UI 1.9.0.
1 parent bd3a348 commit 025266e

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

ui/jquery.ui.resizable.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -204,15 +204,14 @@ $.widget("ui.resizable", $.ui.mouse, {
204204
if (this.elementIsWrapper) {
205205
_destroy(this.element);
206206
var wrapper = this.element;
207-
wrapper.after(
208-
this.originalElement.css({
209-
position: wrapper.css('position'),
210-
width: wrapper.outerWidth(),
211-
height: wrapper.outerHeight(),
212-
top: wrapper.css('top'),
213-
left: wrapper.css('left')
214-
})
215-
).remove();
207+
this.originalElement.css({
208+
position: wrapper.css('position'),
209+
width: wrapper.outerWidth(),
210+
height: wrapper.outerHeight(),
211+
top: wrapper.css('top'),
212+
left: wrapper.css('left')
213+
}).insertAfter( wrapper );
214+
wrapper.remove();
216215
}
217216

218217
this.originalElement.css('resize', this.originalResizeStyle);

0 commit comments

Comments
 (0)