Please consider implementing the beforeinput event (which is close to the keypress event).
Because of this missing implementation, currently I have to write the following in order to work on Pale Moon:
References:
Because of this missing implementation, currently I have to write the following in order to work on Pale Moon:
CODE:
const eventType = ('onbeforeinput' in inputElm) ? 'beforeinput' : 'keypress';inputElm.addEventListener(eventType, function (e) { // ...});
- "keypress" event on MDN (notice all these big red warning banners lol)
- "beforeinput" event on MDN
- "beforeinput" event on caniuse.com (all current browsers support it for some years already)