Jf mouseup create event

Separated event creation into its own function and only create events on the mouse up event.