jquery-typing
jquery-typing copied to clipboard
Pasting text does not trigger event
If I paste text into an input field then the typing event is not fired.
To fix this, use the uncompressed version, and add this after the lines for 'listen to blurs', around line #78:
// Listen to paste
$elem.on('paste', function(event) {
startTyping(event, 0);
});
I forked and fixed it: https://github.com/m1ket/jquery-typing/blob/master/plugin/jquery.typing-0.3.0.js#L82
I'm pretty sure I sent a Pull Request.
I see now. Your pull-request has a few too many files, but your solution is very similar. It looks like this plugin is a bit abandoned, though. :-/
Yea. A good plugin though! I use it a fair bit. Really helpful for auto-complete boxes.
I suggest to use this code, so you simulate the typing and suddenly you stop it with change, cut and paste! ;)
// listen to different events from typing
$elem.on("change cut paste", function(){
// simulates typing
startTyping(event);
// call the stop function and fires the event immediately
stopTyping(event, 0);
});