Skip to main content

Search and Top Navigation

#8662 closed bug (fixed)

Opened October 12, 2012 12:22PM UTC

Closed October 13, 2012 06:51PM UTC

Infinite loop - new to jQuery UI 1.9.0

Reported by: drew.waddell Owned by:
Priority: blocker Milestone: 1.9.1
Component: ui.resizable Version: 1.9.0
Keywords: Cc:
Blocked by: Blocking:

An infinite loop can occur when you add and remove a resizable widget to a text area and then call empty on the text area.

I have a set up a jsFiddle showing the bug here:

You may have to click the "Add Remove Resizer" a few times.

Thanks for looking into this issue,


Attachments (0)
Change History (4)

Changed October 12, 2012 08:35PM UTC by tj.vantoll comment:1

_comment0: I can confirm this. The code is jumping back and forth between the event cleanup code in remove in core and this block in the _destroy method in jquery.ui.resizable.js: \ \ {{{ \ $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing") \ .removeData("resizable").removeData("ui-resizable").unbind(".resizable").find('.ui-resizable-handle').remove(); \ }}}1350094662640334

I can confirm this. When this situation occurs the code attempts to remove the wrapper on line 215 ( This will end up re-invoking the outer _destroy method ( which will again try to remove the wrapper... causing the loop.

Changed October 13, 2012 06:10PM UTC by scottgonzalez comment:2

priority: minorblocker
status: newopen

This started with jQuery 1.8.0.

Changed October 13, 2012 06:32PM UTC by scottgonzalez comment:3

Changed October 13, 2012 06:51PM UTC by Scott González comment:4

resolution: → fixed
status: openclosed

Resizable: Use .insertAfter() instead of .after() to avoid recursively destroying. Fixes #8662 - Infinite loop - new to jQuery UI 1.9.0.

Changeset: 025266e00270d155f45550b6838ddd6f4a44470b