event handler for input delete/undo
javascript, jquery
Solution
You have more problems than this, you also have to worry about browsers with autofill features, etc. For this reason HTML5 has included the `input` event, which is included in modern browsers.
See this answer for a method of capturing every conceivable change event(*) the browser will let you capture, without firing more than once per change.
(*) Looks like they forgot `cut`, so add that in too.
Problem
I need to check for all events which will change the contents of my text input. so far I have handlers for keyup, cut and paste. but the content can also be changed by highlighting the text and clicking delete or undo. is there a way to listen for these events? ``` $('#input').on('paste cut keyup ',function() { //add delete and undo to listner }); ```