Send click events after MouseUp events

Doing it the other way round breaks mouse capturing and can trigger
unwanted clicks.