added input, cut, and paste to textarea messages #53

Open
wants to merge 1 commit into
from

Projects

None yet

1 participant

@kendroberts

Was using keyup to know when to update the "how many characters do you
have" display. Keyup misses context menu cut/paste/undo/redo and drag &
drop changes to the textarea contents. I added input which works in
new browsers to handle all of these. keyup, cut, and paste works in
most other browser as fallback.
http://jsfiddle.net/M2qsa/222/
I had to read up on all this myself here:
http://whattheheadsaid.com/2010/09/effectively-detecting-user-input-in-javascript
(they do even more which I don't understand so don't use)

@kendroberts kendroberts added input, cut, and paste to textarea messages
Was using keyup to know when to update the "how many characters do you
have" display.  Keyup misses context menu cut/paste/undo/redo and drag &
drop changes to the textarea contents.  I added input which workes in
new browsers to handle all of these.  keyup, cut, and paste works in
most other browser as fallback.
http://jsfiddle.net/M2qsa/222/
I had to read up on all this myself here:
http://whattheheadsaid.com/2010/09/effectively-detecting-user-input-in-javascript
(they do even more which I don't understand so don't use)
57a7aad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment