Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

Commit

Permalink
fix(calendar): should stop propagation of touchmove
Browse files Browse the repository at this point in the history
  • Loading branch information
b2nil committed May 12, 2021
1 parent d0f3a4a commit 7164d10
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/calendar/body/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ const AtCalendarBody = defineComponent({
if (!isTouching.value) return
const clientXorY = props.isVertical ? e.touches[0].clientY : e.touches[0].clientX
state.offsetSize = clientXorY - startX.value

e.preventDefault()
e.stopPropagation()
}

function animateMoveSlide(offset: number, callback?: Function) {
Expand Down Expand Up @@ -376,6 +379,7 @@ const AtCalendarBody = defineComponent({
vertical: props.isVertical,
skipHiddenItemLayout: true,
current: currentSwiperIndex.value,
catchMove: true,
onChange: handleChange,
onTouchmove: handleSwipeTouchMove,
onTouchend: handleSwipeTouchEnd,
Expand Down

0 comments on commit 7164d10

Please sign in to comment.