Set event type on enter/leave events

Fixes #444.

(SelectEventPlugin does the same.)