Opened 7 years ago

Closed 7 years ago

#8662 closed bug (fixed)

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

Change History (4)

comment:1 Changed 7 years ago by tj.vantoll

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.

Last edited 7 years ago by tj.vantoll (previous) (diff)

comment:2 Changed 7 years ago by Scott González

Milestone: 1.10.01.9.1
Priority: minorblocker
Status: newopen

This started with jQuery 1.8.0.

comment:4 Changed 7 years ago by Scott González

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

Note: See TracTickets for help on using tickets.