I know if I write $("textarea").on("paste cut", function(e) {})
, then the event handler will be called whenever paste or cut actions are occurring but before the text has been pasted or cut, i.e., before the actions have been completed. But my question is how to make the handlers be called right after the actions have been completed? Thanks.
Asked
Active
Viewed 292 times
0
-
http://forum.jquery.com/topic/simple-custom-afterpaste-event – Abhitalks Jan 10 '14 at 11:01
-
1And this: http://stackoverflow.com/questions/8557995/why-paste-event-in-jquery-fires-on-pre-paste – Abhitalks Jan 10 '14 at 11:02
-
@abhitalks 2nd one is good. – Jai Jan 10 '14 at 11:06
1 Answers
0
Dont know if this satisfies ur requirement. Though its not cleanest solution and is kinda hack. Still you can try it
$("textarea").on('paste', function(e) {
setTimeout(function() {
//Your logic
}, 100);//time in ms
});

Nitin Varpe
- 10,450
- 6
- 36
- 60
-
It is hacky and same as [this](http://stackoverflow.com/a/2242485/1243867), I wouldn't prefer at the moment. – cateyes Jan 10 '14 at 11:15