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

Dragging the slide with touch causes poor performance #100

Closed
logaretm opened this issue Jun 24, 2019 · 0 comments · Fixed by #101
Closed

Dragging the slide with touch causes poor performance #100

logaretm opened this issue Jun 24, 2019 · 0 comments · Fixed by #101

Comments

@logaretm
Copy link
Contributor

Describe the bug

When dragging slides with a touch device (tested on my Surfacebook) the slides are extremely laggy, drops to 5 fps in during the dragging. However results differ on other browsers:

Tested browsers:

  • Firefox ✔
  • Chrome ❌
  • Edge (Pre-Chromium) ❌ doesn't even respond to the touch move event.
  • Edge Beta (Chromium) ❌

It seems related to preventing a "passive" event related to the touchstart.

https://github.com/baianat/hooper/blob/master/src/Hooper.vue#L383

https://github.com/baianat/hooper/blob/master/src/Hooper.vue#L394

To Reproduce
Steps to reproduce the behavior:

  1. Got to the examples page on any touch-capable device.
  2. Drag slides using touch.
  3. Drag using a mouse to compare perceived performance.

Expected behavior
The slide should smoothly follow the touch position like the mouse.

Screenshots

test

Additional context

The logs report a bunch of errors and warnings, the relevant ones are:

Unable to preventDefault inside passive event listener invocation.

[Intervention] Unable to preventDefault inside passive event listener due to the target being treated as passive. See <URL>

This is the captured profile on my device

Profile-20190624T131003.zip

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

Successfully merging a pull request may close this issue.

1 participant