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

Commit

Permalink
fix(modal): stop propagation of touch event in alipay
Browse files Browse the repository at this point in the history
  • Loading branch information
b2nil committed May 24, 2021
1 parent 2e8662b commit 6f00bad
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/modal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,14 @@ const AtModal = defineComponent({
}

return () => {
const disableScroll = process.env.TARO_ENV === 'alipay' ? { disableScroll: true } : {}

// if either title or content exists
if (props.title || props.content) {
const isRenderAction = props.cancelText || props.confirmText

return (
h(View, mergeProps(attrs, {
h(View, mergeProps(attrs, disableScroll, {
class: rootClasses.value,
catchMove: true,
onTouchmove: handleTouchMove
Expand Down Expand Up @@ -166,7 +168,7 @@ const AtModal = defineComponent({
}

return (
h(View, mergeProps(attrs, {
h(View, mergeProps(attrs, disableScroll, {
class: rootClasses.value,
catchMove: true,
onTouchmove: handleTouchMove
Expand Down

0 comments on commit 6f00bad

Please sign in to comment.