Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Touch tap results in mouse events

未关闭
#231 9 条评论 3 个 reaction 已指派 1 人 在 GitHub 查看

@hartzis 已经在做这个了。

开始于 2021年2月19日。

  • #234 来自 @hartzis —— 已关闭,未合并
  • #235 来自 @hartzis —— 已关闭,未合并

评估

这个 Issue 还没有评估数据。

描述

bug 🐛 has example ✅ has solution ✅

Describe the bug
Tapping in the component tracked by the handlers causes multiple handlers to be called

  1. The onTap handler is called with event of type touchend
  2. The onSwiping handler is called with some delta values
  3. The onTap handler is called twice, both with event of type mouseup

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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

FormidableLabs/react-swipeable 的其他 Issue

查看 FormidableLabs/react-swipeable 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。