Ignore bogus events on IE (fixes #1040)

It fixes it better than #1041.