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

Fix handleTouchEnd called not after a handleTouchStart #114

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

serut
Copy link

@serut serut commented Apr 18, 2018

In my application, when I click the first time inside the scrollbar with a Chrome under mobile emulation, the event handleTouchEnd is called but no handleTouchStart.
This PR protects the handleTouchEnd event handler to throw that exception, since this.eventPreviousValues is undefined:

Uncaught TypeError: Cannot read property 'deltaX' of undefined
    at t.value (/bundle.js?5a5c0ac8dc6a61225da1:2:1002364)
    at Object.j (/bundle.js?5a5c0ac8dc6a61225da1:2:762488)
    at Object.invokeGuardedCallback (/bundle.js?5a5c0ac8dc6a61225da1:2:761767)
    at Object.invokeGuardedCallbackAndCatchFirstError (/bundle.js?5a5c0ac8dc6a61225da1:2:761882)
    at Z (/bundle.js?5a5c0ac8dc6a61225da1:2:763535)
    at ee (bundle.js?5a5c0ac8dc6a61225da1:2:763990)
    at ne (/bundle.js?5a5c0ac8dc6a61225da1:2:764175)
    at Array.forEach (native)
    at J (/bundle.js?5a5c0ac8dc6a61225da1:2:763804)
    at le (/bundle.js?5a5c0ac8dc6a61225da1:2:764909)

@serut
Copy link
Author

serut commented Apr 18, 2018

I thought at first one of my issue came from your lib, so I fix it. But in fact it was something else.

Anyway, you should merge it to prevent people using Chrome debugger to see that issue and loose some time on it as that event can be safely ignored.

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 this pull request may close these issues.

None yet

1 participant