We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://github.com/syory-ken/f2-wx-bug-demo
小程序 e.detail 返回的x,y是点击位置和顶部的距离,与getBBox返回x,y相对距离不一致,导致位置判断错误。
event.touches = [e.detail];
将 e.detail.x,y 分别减去e.target.offsetLeft、offsetTop
event.touches = [{ x: e.detail.x - e.target.offsetLeft, y: e.detail.y - e.target.offsetTop }];
The text was updated successfully, but these errors were encountered:
fix: 微信小程序点击位置不正确。Closed #1517
927a91a
156c008
zengyue
No branches or pull requests
Reproduction link
https://github.com/syory-ken/f2-wx-bug-demo
Steps to reproduce
问题原因
小程序 e.detail 返回的x,y是点击位置和顶部的距离,与getBBox返回x,y相对距离不一致,导致位置判断错误。
问题代码
解决方法
将 e.detail.x,y 分别减去e.target.offsetLeft、offsetTop
The text was updated successfully, but these errors were encountered: