jquery-typing icon indicating copy to clipboard operation
jquery-typing copied to clipboard

Pasting text does not trigger event

Open m1ket opened this issue 12 years ago • 5 comments

If I paste text into an input field then the typing event is not fired.

m1ket avatar Jan 29 '13 17:01 m1ket

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);
    });

bobdenotter avatar Sep 10 '13 12:09 bobdenotter

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.

m1ket avatar Sep 10 '13 13:09 m1ket

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. :-/

bobdenotter avatar Sep 10 '13 13:09 bobdenotter

Yea. A good plugin though! I use it a fair bit. Really helpful for auto-complete boxes.

m1ket avatar Sep 10 '13 14:09 m1ket

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);
    });

360fun avatar Feb 16 '15 13:02 360fun