I don't know if this is a bug in UI Draggable, UI Widget Factory, or in jQuery 1.5, but I'm posting it as a Draggable bug because this is the widget affected by it...
When jQuery 1.5 is used with UI 1.8.9, the Draggable widget is BROKEN if this option is used:
The Draggable widget initializes correctly, but as soon as the element is dragged *one time*, the widget destroy()s itself!
The issue disappears when jQuery 1.4.4 is used. I traced the flow of events, but am unable to find what has changed in jQuery 1.5 to trigger this problem.
The problem starts with the Draggable remove() method, which is called to remove the _temporary_ helper-element. However this is handled ''as if'' the _original_ element is being removed from the DOM, and so the Draggable destroy() method is called to unbind all event handlers.
This is a major bug that breaks ANY widget or code that uses the helper:clone option.
I created a clear, simple demo of this problem here:
This issue has broken my widget, which is used on hundreds of websites. Therefore all these websites are unable to upgrade to jQuery 1.5, so it is generating a lot of complaints. Normally I'd provide a patched version of UI for users until an updated version is released, but this time I am unable to trace the root problem due to the long, complex sequence of calls back and forth between the jQuery and UI libraries.
I hope this very serious bug will get prompt attention. If it's really a bug in jQuery 1.5 - and not a logic bug in UI that 1.5 has 'exposed' - please let me know ASAP so I can post it as a jQuery bug instead.
Thanks in advance.