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

Firefox behaviour with `keypress` events

Open xiaohutai opened this issue 7 years ago • 0 comments

I know that this is an old library, but for those who are still using this: Firefox will fire the start (and stop) events even if you use the navigation keys; other browser don't do this.

In order to fix this issue. On https://github.com/narfdotpl/jquery-typing/blob/master/plugin/jquery.typing-0.2.0.js#L65, change:

-$elem.keypress(startTyping);
+$elem.on('input', startTyping);

Sources:

  • https://developer.mozilla.org/en/docs/Web/Events/keypress
  • https://developer.mozilla.org/en-US/docs/Web/Events/input

xiaohutai avatar Jul 24 '17 09:07 xiaohutai