Touch tap results in mouse events
评估
这个 Issue 还没有评估数据。
描述
Describe the bug
Tapping in the component tracked by the handlers causes multiple handlers to be called
- The
onTaphandler is called with event of typetouchend - The
onSwipinghandler is called with some delta values - The
onTaphandler is called twice, both with event of typemouseup
Steps or Sandbox to reproduce
Observe the following codesandbox application console log when touch-tapping in the blue area.
https://codesandbox.io/s/react-swipeable-tap-bug-yrbyu
Expected behavior
WHEN both trackMouse and trackTouch options are set to true
GIVEN a single touch tap in the component
THEN only onTap handler is called, with one event of type touchend
Device/Browser
Tested on
- Dell XPS with touch screen, running Fedora 34, in Firefox, Chrome and Brave
- Samsung Galaxy S10, running Android 11, in Chrome and Brave
Sliding/swiping works very well in all the mentioned environments, but a single touch tap also gives the same result in all of them.
Additional context
The react-swipeable hook as such is very time saving and smooth! Thanks for the great work!
- 主要语言
- TypeScript
- 星标
- 2.1k
- 派生
- 149
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
FormidableLabs/react-swipeable 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 30/100
-
难度 3/5 1-2 天 新手友好度 45/100
-
难度 3/5 1-2 天 新手友好度 30/100
FormidableLabs/react-swipeable#332 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
查看 FormidableLabs/react-swipeable 的全部 Issue
相似的 Issue
-
enhancement good first issue help wanted
难度 2/5 1-3 小时 新手友好度 78/100
OWASP/cve-lite-cli#1335 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 66/100
code-yeongyu/senpi#3353 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Channels status: needs triage
难度 2/5 1-3 小时 新手友好度 70/100
mastra-ai/mastra#27093 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement needs-triage ui
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复