Skip to content

Commit

Permalink
refactor: code simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
1587315093 committed Aug 4, 2023
1 parent efdefc4 commit e20ef21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/use-lock-scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ export function useLockScroll(
touch.isVertical() &&
!(parseInt(status, 2) & parseInt(direction, 2))
) {
if (event.cancelable) {
if (event.cancelable && supportsPassive) {
// https://github.com/ant-design/ant-design-mobile/issues/6282
supportsPassive && event.preventDefault()
event.preventDefault()
}
}
}
Expand Down

0 comments on commit e20ef21

Please sign in to comment.