I'm having an issue with binding the paste event to a text input in jQuery. The event is fired when the user pastes but in the callback $(this).val();
returns the old value, not the new one that was pasted in. I was able to hack it in Chrome but not in Firefox.
The functionality I'm going for is like when you paste a URL into Facebook's status box and it instantly generates a preview of that URL.
I believe the issue is that the paste event callback is getting called before the value of the textbox is updated. But I could be wrong so if anyone has some insight as to why this is happening I'm all ears.
I've made a JSFiddle to illustrate the issue here: http://jsfiddle.net/ybqPp/1/
Any and all help is appreciated.