Fix tap event fallback

Previously the click event callback was called before mouseup
which led to JS errors.