diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-10-13 14:50:51 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-10-13 14:50:51 -0400 |
commit | 025266e00270d155f45550b6838ddd6f4a44470b (patch) | |
tree | a06a77da63c7b11ff134ef5a0fb2563fe219853d /ui | |
parent | bd3a348776bf50da53d17f1574efd5538ce9de4f (diff) | |
download | jquery-ui-025266e00270d155f45550b6838ddd6f4a44470b.tar.gz jquery-ui-025266e00270d155f45550b6838ddd6f4a44470b.zip |
Resizable: Use .insertAfter() instead of .after() to avoid recursively destroying. Fixes #8662 - Infinite loop - new to jQuery UI 1.9.0.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.resizable.js | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/ui/jquery.ui.resizable.js b/ui/jquery.ui.resizable.js index cc82b8b92..c1fd676d9 100644 --- a/ui/jquery.ui.resizable.js +++ b/ui/jquery.ui.resizable.js @@ -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); |