Only preventDefault when gesture is in the horizontal direction