Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复部分android机型点击命中率低 #12857

Merged
merged 2 commits into from
Dec 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ export default function <P extends Record<string, any>>(WrappedComponent: React.
onTouchEnd && onTouchEnd(this.getWxAppEvent(evt))
const endTimestamp = evt.nativeEvent.timestamp
const gapTime = endTimestamp - this.startTimestamp
const hasMove = Math.abs(gestureState.dx) >= 1 || Math.abs(gestureState.dy) >= 1
// 1 =>3, 修复部分android机型(三星折叠屏尤为明显),单击时dx,dy为>1,而被误判为move的情况。
const hasMove = Math.abs(gestureState.dx) >= 3 || Math.abs(gestureState.dy) >= 3
if (!hasMove) {
if (gapTime <= 350) {
onClick && onClick(this.getWxAppEvent(evt))
Expand Down