Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Touch tap results in mouse events

Đang mở
#231 9 bình luận 3 reaction 1 người được giao Xem trên GitHub

@hartzis đang làm issue này rồi.

Từ ngày 19/2/2021.

  • #234 của @hartzis — đã đóng, không merge
  • #235 của @hartzis — đã đóng, không merge

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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!

Ngôn ngữ chính
TypeScript
Star
2.1k
Fork
149
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của FormidableLabs/react-swipeable

Tất cả issue của FormidableLabs/react-swipeable

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.