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

Trigger pointer leave when active controller switched #36662

Closed
wants to merge 1 commit into from

Conversation

genkikondo
Copy link
Contributor

Summary:
For VR, JSPointerDispatcher skips calculating the delta of hit targets (which happens in onMove) on the frame in which the active controller is switched because the motion event is a DOWN event, not a MOVE event in that specific frame.

This diff fixes the issue by just calling onMove in addition to onDown for DOWN motion events. Unfortunately we do not have separate pointer IDs for each controller.

This won't change the behavior for non-hoverable pointers. For hoverable pointers, it will dispatch an extra pointer_enter if the hit path has changed between the last move event and the down event.

Changelog:
[Internal][Fixed] - Trigger pointer leave when active controller switched

Reviewed By: lunaleaps, javache

Differential Revision: D44377324

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels Mar 27, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D44377324

genkikondo added a commit to genkikondo/react-native that referenced this pull request Mar 27, 2023
Summary:
Pull Request resolved: facebook#36662

For VR, JSPointerDispatcher skips calculating the delta of hit targets (which happens in onMove) on the frame in which the active controller is switched because the motion event is a DOWN event, not a MOVE event in that specific frame.

This diff fixes the issue by just calling onMove in addition to onDown for DOWN motion events. Unfortunately we do not have separate pointer IDs for each controller.

This won't change the behavior for non-hoverable pointers. For hoverable pointers, it will dispatch an extra pointer_enter if the hit path has changed between the last move event and the down event.

Changelog:
[Internal][Fixed] - Trigger pointer leave when active controller switched

Reviewed By: lunaleaps, javache

Differential Revision: D44377324

fbshipit-source-id: 305ba766d5b8324b312a6607086dbfb7b0d6622b
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D44377324

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D44377324

genkikondo added a commit to genkikondo/react-native that referenced this pull request Mar 27, 2023
Summary:
Pull Request resolved: facebook#36662

For VR, JSPointerDispatcher skips calculating the delta of hit targets (which happens in onMove) on the frame in which the active controller is switched because the motion event is a DOWN event, not a MOVE event in that specific frame.

This diff fixes the issue by just calling onMove in addition to onDown for DOWN motion events. Unfortunately we do not have separate pointer IDs for each controller.

This won't change the behavior for non-hoverable pointers. For hoverable pointers, it will dispatch an extra pointer_enter if the hit path has changed between the last move event and the down event.

Changelog:
[Internal][Fixed] - Trigger pointer leave when active controller switched

Reviewed By: lunaleaps, javache

Differential Revision: D44377324

fbshipit-source-id: 948fb862075ab24f078e5cb2a0e7a8de1641ae13
Summary:
Pull Request resolved: facebook#36662

For VR, JSPointerDispatcher skips calculating the delta of hit targets (which happens in onMove) on the frame in which the active controller is switched because the motion event is a DOWN event, not a MOVE event in that specific frame.

This diff fixes the issue by just calling onMove in addition to onDown for DOWN motion events. Unfortunately we do not have separate pointer IDs for each controller.

This won't change the behavior for non-hoverable pointers. For hoverable pointers, it will dispatch an extra pointer_enter if the hit path has changed between the last move event and the down event.

Changelog:
[Internal][Fixed] - Trigger pointer leave when active controller switched

Reviewed By: lunaleaps, javache

Differential Revision: D44377324

fbshipit-source-id: 001ba36cce7b545643b700e0ad89075e05288619
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D44377324

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,519,469 -18
android hermes armeabi-v7a 7,835,672 -33
android hermes x86 8,998,620 -21
android hermes x86_64 8,854,800 -15
android jsc arm64-v8a 9,140,857 +0
android jsc armeabi-v7a 8,332,999 -4
android jsc x86 9,194,548 +1
android jsc x86_64 9,453,632 -8

Base commit: 406f9fc
Branch: main

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Mar 27, 2023
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 3361290.

jeongshin pushed a commit to jeongshin/react-native that referenced this pull request May 7, 2023
Summary:
Pull Request resolved: facebook#36662

For VR, JSPointerDispatcher skips calculating the delta of hit targets (which happens in onMove) on the frame in which the active controller is switched because the motion event is a DOWN event, not a MOVE event in that specific frame.

This diff fixes the issue by just calling onMove in addition to onDown for DOWN motion events. Unfortunately we do not have separate pointer IDs for each controller.

This won't change the behavior for non-hoverable pointers. For hoverable pointers, it will dispatch an extra pointer_enter if the hit path has changed between the last move event and the down event.

Changelog:
[Internal][Fixed] - Trigger pointer leave when active controller switched

Reviewed By: lunaleaps, javache

Differential Revision: D44377324

fbshipit-source-id: 9f668e64f486b9a12ab36563ec2b7cf93f208a54
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
Pull Request resolved: facebook#36662

For VR, JSPointerDispatcher skips calculating the delta of hit targets (which happens in onMove) on the frame in which the active controller is switched because the motion event is a DOWN event, not a MOVE event in that specific frame.

This diff fixes the issue by just calling onMove in addition to onDown for DOWN motion events. Unfortunately we do not have separate pointer IDs for each controller.

This won't change the behavior for non-hoverable pointers. For hoverable pointers, it will dispatch an extra pointer_enter if the hit path has changed between the last move event and the down event.

Changelog:
[Internal][Fixed] - Trigger pointer leave when active controller switched

Reviewed By: lunaleaps, javache

Differential Revision: D44377324

fbshipit-source-id: 9f668e64f486b9a12ab36563ec2b7cf93f208a54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants