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

Scrollable drawers have a bad frame rate when dragging #44

Open
RickRyan26 opened this issue Feb 2, 2024 · 7 comments
Open

Scrollable drawers have a bad frame rate when dragging #44

RickRyan26 opened this issue Feb 2, 2024 · 7 comments

Comments

@RickRyan26
Copy link

Describe the bug

This is happening on in Chrome on Android and destroys the silky smooth authentic.

Any thoughts on a fix?

Reproduction

The scrollable example has the problem

Logs

No response

System Info

Android

Severity

annoyance

@huntabyte
Copy link
Owner

What are the specs of the phone? Is anyone else experiencing this issue?

I'm running the latest iPhone so it wont mean much when I say it's smooth on my end.

I know @TGlide has an Android - are you able to reproduce this experience https://vaul-svelte.com/examples ?

@RickRyan26
Copy link
Author

Using a Pixel 7 pro. It happens when the scroll leads into the drag down

@TGlide
Copy link

TGlide commented Feb 2, 2024

Yes, I can reproduce. Pixel 7 here, happening on FF and Chrome

screen-20240202-083925.mp4

@huntabyte
Copy link
Owner

Thanks man! @TGlide - will look into this one!

@RickRyan26
Copy link
Author

I appreciate it!

Also when I load up a non-scrollable drawer with a lot of elements it negatively affects the drag's frame rate on my phone as well, BUT when that same drawer is triggered to open/close the animation is back to seamless. Why is that? I'm having trouble wrapping my head around it 😕

@huntabyte
Copy link
Owner

I'm pretty sure I know what introduced the issue. On certain devices/browsers when using mobile devices, pointerup isn't fired when there is scrollable content on a "long press and drag", so I added touch listeners to cover those cases. It seems that is causing some issues on your end as I'd bet both are firing and conflicting with one another, causing the lagginess to occur.

I'm looking into this now.

@RickRyan26
Copy link
Author

Brilliant idea. Hope you can detect if both exist and disable one if so

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

3 participants