$(document).on("input",".SomeClass") works on Chrome but not IE

google-chrome, html, internet-explorer, javascript, jquery

Solution

This is a reported bug (#794285) in IE10 and IE11: `contenteditable` elements do not fire the `input` event.

A workaround be to handle different event types alongside `input`, such as `keypress`, `paste` and `change`:

$(document).on("input keypress paste change", ".SomeClass", function () {
    console.log("input entered");
});

JSFiddle demo.

Problem

I have a span with contenteditable tag and I have a function used to detect input into it.. ``` //TextArea <span class="SomeClass" contenteditable></span> //Function $(document).on("input", ".SomeClass", function () { console.log("input entered"); }); ``` This works for me on Chrome but not on the IE 11 or below. I can't seem to find any mention of it online and was wondering if anyone could give me information on how to get this working or a better approach. Thanks

Original source