Fix bug where missing event handler breaks JavaScript in Firefox.