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(ios): loss of touch end or cancel event in multi-finger scenarios #3892

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

wwwcg
Copy link
Collaborator

@wwwcg wwwcg commented Jun 11, 2024

Before submitting a new pull request, please make sure:

  • Test cases have been added/updated/passed for the code you will submit.
  • Documentation has added or updated.
  • Commit message is following the Convention Commit guideline with maximum 72 characters.
  • Squash the repeat code commits, short patches are welcome.

In a multi-finger scenario,
the _touchBeganView local variable only records the last touch view
since touch began is entered multiple times,
causing the began and cancel/end events to be unmatched.

To fix this, we use a simple approach -
that record all touch began Views and send events to all recorded views at the end.

Please note that we have not fully adapted the multi-fingered scenario.
@wwwcg wwwcg requested a review from ruifanyuan as a code owner June 11, 2024 09:18
@github-actions github-actions bot added renderer: native size: s Denotes a PR that changes 10-99 lines labels Jun 11, 2024
Copy link

hippy-service bot commented Jun 11, 2024

Hi, @wwwcg. Thanks for your PR! 👏

🏷️ You can leave a comment in this PR with #help tag when you need help (e.g. some status checks run failed due to internal issue), admin team members will help asap.

@wwwcg wwwcg merged commit 7ab2ec1 into Tencent:main Jun 11, 2024
30 checks passed
wwwcg added a commit to wwwcg/Hippy that referenced this pull request Jun 11, 2024
…Tencent#3892)

* fix(ios): loss of touch end or cancel event in multi-finger scenarios

In a multi-finger scenario,
the _touchBeganView local variable only records the last touch view
since touch began is entered multiple times,
causing the began and cancel/end events to be unmatched.

To fix this, we use a simple approach -
that record all touch began Views and send events to all recorded views at the end.

Please note that we have not fully adapted the multi-fingered scenario.

* fix(ios): resolve exception where touchView may be nil
wwwcg added a commit to wwwcg/Hippy that referenced this pull request Jun 18, 2024
…Tencent#3892)

* fix(ios): loss of touch end or cancel event in multi-finger scenarios

In a multi-finger scenario,
the _touchBeganView local variable only records the last touch view
since touch began is entered multiple times,
causing the began and cancel/end events to be unmatched.

To fix this, we use a simple approach -
that record all touch began Views and send events to all recorded views at the end.

Please note that we have not fully adapted the multi-fingered scenario.

* fix(ios): resolve exception where touchView may be nil
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
renderer: native size: s Denotes a PR that changes 10-99 lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant