-
Notifications
You must be signed in to change notification settings - Fork 312
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: PointerEventData.pointerId is the same when simultaneously releasing and then pressing with another finger (ISXB-845) #2033
FIX: PointerEventData.pointerId is the same when simultaneously releasing and then pressing with another finger (ISXB-845) #2033
Conversation
a5fec7f
to
c645468
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't test it, looks good from what I see
Packages/com.unity.inputsystem/InputSystem/Plugins/UI/InputSystemUIInputModule.cs
Outdated
Show resolved
Hide resolved
Packages/com.unity.inputsystem/InputSystem/Plugins/UI/InputSystemUIInputModule.cs
Outdated
Show resolved
Hide resolved
scene.leftChildReceiver.events.Clear(); | ||
|
||
Assert.That(scene.eventSystem.IsPointerOverGameObject(), Is.False); | ||
Assert.That(scene.eventSystem.IsPointerOverGameObject(touchScreen.deviceId), Is.False); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure that this assert is valid touchScreen.deviceId
doesn't represent a pointer id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed. It was copied from previous tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked with 22LTS + Pixel 6
0781d9f
to
d41d05c
Compare
Covers the edge case of releasing one finger and pressing with another in the same frame.
… cache The commit also: - Expands unit test case - Removes m_PointerTouchControls as they were not being used anymore
d41d05c
to
dd3127a
Compare
Description
Fix for https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-845
A new pointer was not being created when we released and pressed a finger in the same frame, even though a new touchId was being produced by the native side.
This PR fixes that by looking into pointerIds instead of cached pointer controls. The cached pointer controls wouldn't reflect the control with the correct touchId when we release and press a touch control in the same frame.
Testing status & QA
Please test the bug project with and without this PR on a mobile device (Android or iOS)
For example, to reproduce the issue (more instructions in the bug report):
With the PR, in this example, step 3 should show the right panel green ✅
Overall Product Risks
Low
Checklist
Before review:
Changed
,Fixed
,Added
sections.Area_CanDoX
,Area_CanDoX_EvenIfYIsTheCase
,Area_WhenIDoX_AndYHappens_ThisIsTheResult
.During merge:
NEW: ___
.FIX: ___
.DOCS: ___
.CHANGE: ___
.RELEASE: 1.1.0-preview.3
.After merge: