Events are now dispatched on disabled form widgets

Published: | Categories: DOM

Description

Starting with Firefox 65, form elements like <input>, <textarea>, <button> and <select> will allow to dispatch standard and custom events even when they are disabled. This change aims at improving the interoperability among browsers and responding to web developer needs.

Given that the element is disabled and unfocusable, most of events such as mousedown, mouseup, click, focus and input won’t be fired by regular user interactions, but mouseover, mouseenter, mousemove, mouseout and mouseleave will now be fired unlike the current version of Google Chrome, Apple Safari and Microsoft Edge.

In order to avoid any unexpected behaviour, it might be better to always check the disabled property on the form element before further processing within your event handler.

References