Firefox 87 Released, Enables beforeinput Event For Form Inputs

Browser News

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>
    
  • And more.

Read full post on hacks.mozilla.org

April 1, 2021

Comments

Loading Comments