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: |
Description
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: http://jsfiddle.net/dwaddell/a3dxL/
You may have to click the "Add Remove Resizer" a few times.
Thanks for looking into this issue,
Drew
Attachments (0)
Change History (4)
Changed October 12, 2012 08:35PM UTC by 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 |
---|
Changed October 13, 2012 06:10PM UTC by comment:2
milestone: | 1.10.0 → 1.9.1 |
---|---|
priority: | minor → blocker |
status: | new → open |
This started with jQuery 1.8.0.
Changed October 13, 2012 06:32PM UTC by comment:3
Specifically this change in .after()
: https://github.com/jquery/jquery/commit/05aff402310d7db5d15f96b15071af6aa21a2afc#L1L161
I can confirm this. When this situation occurs the code attempts to remove the wrapper on line 215 (https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.resizable.js#L215). This will end up re-invoking the outer _destroy method (https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.resizable.js#L194) which will again try to remove the wrapper... causing the loop.