Fix Firefox bug when creating a new post

Event wasn't defined, so it's kind of difficult to call preventDefault() on – Chrome doesn't auto-submit the form without an action, but Firefox does.