Fix bug of ungrab of tap event instead of pan event