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

ScrollView 组件中, 关于 cancelInnerEvents 和 滚动距离 的 缺陷 #17903

Open
finscn opened this issue Nov 21, 2024 · 1 comment
Open
Labels
Bug Needs Triage Needs to be assigned by the team

Comments

@finscn
Copy link
Contributor

finscn commented Nov 21, 2024

Cocos Creator version

3.8.4

System information

all

Issue description

现象:
一个滚动列表里 如果有按钮, 那么 当 cancelInnerEvents = true 时, , 在某些设备上 按钮经常很难被点击到.

原因:
列表滚动会取消(拦截) 列表子节点接收touch相关事件 .
这个做法是ok的. 但是 对于"移动多少距离后 取消" 这个数值 应该允许开发者设置, 如果不允许 那么cocos内部应该有一个科学的计算方式.
但是我看了 cocos的源码, 写死的 7 . 很不科学.

image

希望这段 // FIXME: touch move delta should be calculated by DPI. 的代码能早日 fix.

Relevant error log output

No response

Steps to reproduce

.

Minimal reproduction project

No response

@finscn finscn added Bug Needs Triage Needs to be assigned by the team labels Nov 21, 2024
@finscn finscn changed the title ScrollView 组件中, 关于 当 cancelInnerEvents 和 滚动距离 的 缺陷 ScrollView 组件中, 关于 cancelInnerEvents 和 滚动距离 的 缺陷 Nov 21, 2024
@finscn
Copy link
Contributor Author

finscn commented Nov 22, 2024

补充下, 如果用触控笔, 对这个值的要求会更高. 触控笔比较滑也比较敏感, 我自己写了个程序测试,
iPad + 触控笔, 普通的点击屏幕 至少都会有 10--13像素左右的位移.

我自己测试下来, 把 7 改为 8 * cc.screen.devicePixelRatio 会更合适一些.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Needs to be assigned by the team
Projects
None yet
Development

No branches or pull requests

1 participant