I am wondering if there is a polyfill to support the contenteditable input event in IE11?
I am specifically talking about this event: http://jsfiddle.net/ch6yn/
Which fires whenever a change happens on a contenteditable div regardless of the source (e.g. copy/paste/drag/drop/type etc).
<div contenteditable="true" id="editor">Please type something in here</div>
<script>
document.getElementById("editor").addEventListener("input", function() {
alert("input event fired");
}, false);
</script>
Ran into this today, this was how I solved it..
Solution: Change event name --> "textinput" works in IE 11 for event attachment - just be sure you let the other browsers use "input".
Example:
//Check for IE ('Trident')
var eventType = /Trident/.test( navigator.userAgent ) ? 'textinput' : 'input';
//Attach your event
this.refs.captionInput.addEventListener( eventType, this.handleChangeCaption );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With