adobe / spectrum-web-components

Spectrum Web Components
https://opensource.adobe.com/spectrum-web-components/
Apache License 2.0
1.21k stars 192 forks source link

[Bug]: On mobile when user performs a scroll gesture on a sp-card with href value it triggers a link click event #2922

Open monkeyjabs opened 1 year ago

monkeyjabs commented 1 year ago

Code of conduct

Impacted component(s)

sp-card

Expected behavior

Scroll gesture should NOT trigger a link open

Actual behavior

Scroll gesture opens the link on the card

Screenshots

No response

What browsers are you seeing the problem in?

Chrome

How can we reproduce this issue?

  1. Go to this example: https://studio.webcomponents.dev/preview/8P1Q53iqVXzEuCUa9aTi/www?p=website&busid=bb541230-a96a-11ed-a48a-4b3cebfb60d5
  2. Open browser and toggle on the device toolbar
  3. Try to tap and hold on the card and scroll

Sample code that illustrates the problem

No response

Logs taken while reproducing problem

No response

Westbrook commented 1 year ago

Feels like maybe we should only do event unbinding and not clicking when responding to pointercancel in there? If you were available to do some testing and were interested in submitting a PR, we'd be happy to support getting it over the line.