I want to detect if textarea value is modified. here is whatever I've done- html:
<textarea id="textarea" autofocus></textarea>
js:
var textarea = document.getElementById("textarea");
textarea.onpaste = textarea.onkeypress = function() {
isModified = true;
};
I know there is another option, onchange but that won't work here because the textarea is autofocused and the onchange event wont work until the textarea is blured. and I don't want to blur the textarea.
So my question is that are there any other option of doing so? Thanks.