I'm looking for a way to run some JS when a textarea gets resized.
After an hour of searching and fiddling I have something that kinda works, but it is not good enough.
titleTextArea.mouseup(function() {
popup.update(); titleTextArea.focus();
});
The problem with the above code is that it also runs when clicking in the textarea. The code I am running causes the textarea to get re-rendered, which should not happen while someone is working in it, as it messes with the focus.
I've tried using jQuery resizable as per this SO post. For some reason the resize event does not fire. And really I'd prefer not needing to pull in jQuery UI for this.
Is there a way to run code on textbox resize (only on completion of resize is fine) that does not get triggered by a bunch of different actions as well?
(PS: why is there no vanilla event for this?!)