Reverted Support for Event.returnValue has been added

Published: | Categories: DOM


Firefox 63 has implemented the window.event property, which is derived from Internet Explorer but now standardized in the DOM spec along with Event.prototype.srcElement and Event.prototype.returnValue.

While this change aims at improving web compatibility, it’s expected that certain browser detection code using the once-non-standard property will rather be broken. A typical case already reported involves event.keyCode returning 0 in Firefox, which is being solved by Mozilla engineers. There might be other issues, so please scan your code and, if window.event is found, make sure the functionality works with Firefox.

Note that the support for srcElement has already been added with Firefox 62, and it also causes at least one compatibility issue.

Update: The Event.prototype.returnValue property has also been added with Firefox 63. The title of this post has been updated accordingly.

Update 2: window.event is not going to ship with Firefox 63 due to several compatibility issues, mainly because Firefox doesn’t support the keyCode property on it. Now window.event is disabled on non-Nightly channels. The title of this post has been updated again.

Update 3: The support for Event.returnValue has been temporarily disabled in Firefox 64 due to some broken web apps. It will be enabled again with Firefox 65 after the keypress event’s compatibility issue is solved.