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: fix incorrect isTrusted value in finishScroll event #41

Merged
merged 2 commits into from
Jun 9, 2023

Conversation

malangfox
Copy link
Contributor

@malangfox malangfox commented Jun 9, 2023

Details

This sets the isTrusted value in finishScroll event more accurately after fixing the bug in #34.

First, I removed the following logic from the change event.
if (nativeEvent && !isHold) { return; }
Removing this part will not change the behavior, as it was working correctly in the previous situation where isHold was being calculated as true.

And I fixed an issue where _isAnimation was being set incorrectly, affecting the isTrusted value of finishScroll event.

_isAnimation should be set to true when conveyer is not in a holding state and a change event is not fired by the user wheel, assuming that change event has occurred due to internal methods.

Copy link
Member

@daybrush daybrush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@malangfox malangfox merged commit 7a32ec8 into naver:main Jun 9, 2023
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.

2 participants