Fix "ReferenceError: event is not defined" errors in Firefox

`event` was referenced in several places despite the event actually being
assigned to `e`.