Firefox 87 was released on 23rd March, 2021. Major web platform updates in this version include :
Support added for beforeinput event. This event allows web apps to override text edit behavior before the browser actually modifies the DOM tree. This event will work for <input>, <select>, <textarea> or elements with contenteditable attribute enabled.
<input id="phone" type="text" />
<script>
document.querySelector("#phone").addEventListener('beforeinput', function() {
// before input value is actually rendered by browser
});
</script>
Comments