We are making a complex text editor using a contentEditable DIV. On mobile, when virtual keyboard give a suggestion or autocorrects a word, a single input event is first called of type deleteContentBackward before inserting text. This single input event often erase more than one character in that context. How can we get the number of backward deletion of a single input event of type deleteContentBackward using javascript?
Here is the code we use to debug at the moment:
document.getElementById('INPUT').addEventListener('input', (event) => { console.log(event);
document.getElementById('inputDebugDIV').innerHTML+="event.inputType:"+event.inputType; });