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

md-ripple: does not disappear after losing focus/active with swiperjs #5575

Open
kkachniarz220 opened this issue Apr 9, 2024 · 3 comments
Open

Comments

@kkachniarz220
Copy link
Contributor

What is affected?

Component

Description

screen-capture.10.webm

Should the ripple be visible permanently after touch?

Reproduction

Use ripple in some scrollable element

Workaround

.

Is this a regression?

No or unsure. This never worked, or I haven't tried before.

Affected versions

1.4.0

Browser/OS/Node environment

Chrome 123.0.6312.106 (Official Build) (64-bit)
Windows 11
npm 10.2.3
node 20.10.0

@asyncLiz
Copy link
Collaborator

asyncLiz commented Apr 9, 2024

Can you provide a minimal reproduction using something like https://lit.dev/playground?

@kkachniarz220
Copy link
Contributor Author

kkachniarz220 commented Apr 10, 2024

Hmm, seems like the problem occurs with SwiperJS.

Playground

2024-04-10.mp4

Maybe some ideas why is this happening?

image

vanilla - events emitted in vanilla css solution
swiperjs - events emitted in swiperjs solution

@asyncLiz
Copy link
Collaborator

It looks like swiperjs is intercepting the pointercancel event. The browser will dispatch that event when it detects that a user is swiping instead of tapping. When this happens, we end the ripple's animation early.

State is getting mismatched because the pointerup event's pointerId doesn't match the pointerenter's pointerId here.

I don't think I'll be able to take a look at swiperjs compatibility unfortunately. Our ripple.shouldReactToEvent() may need tweaks to support swiperjs while also handling the vanilla use case of tapping with multiple pointers.

@asyncLiz asyncLiz changed the title md-ripple: does not disappear after losing focus/active md-ripple: does not disappear after losing focus/active with swiperjs Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants