Reputation: 1021
I'm having a problem with the combination of these features of jQuery. The element will start off both draggable and resizable, and it remains resizable when I double-click the element to edit its content (by appending an input with the value of the element).
However, when I deactivate it (shove the value of the input back into the element and remove the input), it remains draggable but is no longer resizable, even though I can see through Firebug that it still has the ui-resizable class.
Now I do use .live() to support dynamically added elements, and instead of going into huge detail, I've set up a jsFiddle with a stripped-down version of my code.
Thank you for your help!
Upvotes: 1
Views: 753
Reputation: 1021
I have solved this problem myself. The problem is that I was replacing everything in the element with the text from the input. Since the resizable function of jQuery UI actually adds divs to an element to allow for resizing, the replacement was removing the divs. So instead I searched for a certain node and just replaced that.
That was it, but it took me a while and a lot of debugging to figure that out.
Upvotes: 2