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

Commit 6f00bad

Browse files
committed
fix(modal): stop propagation of touch event in alipay
1 parent 2e8662b commit 6f00bad

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/modal/index.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,14 @@ const AtModal = defineComponent({
9393
}
9494

9595
return () => {
96+
const disableScroll = process.env.TARO_ENV === 'alipay' ? { disableScroll: true } : {}
97+
9698
// if either title or content exists
9799
if (props.title || props.content) {
98100
const isRenderAction = props.cancelText || props.confirmText
99101

100102
return (
101-
h(View, mergeProps(attrs, {
103+
h(View, mergeProps(attrs, disableScroll, {
102104
class: rootClasses.value,
103105
catchMove: true,
104106
onTouchmove: handleTouchMove
@@ -166,7 +168,7 @@ const AtModal = defineComponent({
166168
}
167169

168170
return (
169-
h(View, mergeProps(attrs, {
171+
h(View, mergeProps(attrs, disableScroll, {
170172
class: rootClasses.value,
171173
catchMove: true,
172174
onTouchmove: handleTouchMove

0 commit comments

Comments
 (0)