Invalidate mouse position when releasing final touch #6458
+74
−12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes an issue in mobile where if a user pressed a specific button in the game, the button will remain in a hovered state because that's where the mouse position was last at. Using the feedback of touch end event, we can put the mouse position in an "invalid" state such that any hovered drawable becomes unhovered, giving a more natural UX for mobile users.
For emphasizing purposes, the following are "broken" with this change:
ExpandingContainer
usages (fixable)Whether they are considered blockers for this PR or not is up for debate, so I'm keeping this PR open. The fixable parts will be fixed if this PR is agreed upon first (i.e. if tooltips do not block this).
Before:
ScreenRecording_12-15-2024.10-54-52_1.mov
After:
ScreenRecording_12-15-2024.10-57-34_1.mov
(notice the buttons don't stay hovered after tapping them)