Fix iOS Touch popover gesture completion#911
Merged
Merged
Conversation
3 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses an iOS UIKit gesture lifecycle issue where executing Touch.Command directly from TouchesEnded could leave scroll/swipe-back gestures in a broken state after dismissing a popover/context menu. The approach is to explicitly complete the custom tap recognizer’s state and defer command execution to the next main-thread turn, ensuring UIKit sees a clean gesture boundary before presenting overlays.
Changes:
- Updated the iOS tap gesture recognizer to explicitly transition to
Ended/Failed/Cancelledand defer tap command execution viaMainThread.BeginInvokeOnMainThread. - Adjusted simultaneous-recognition handling to avoid the previous broad pan workaround while still canceling touch visual state in the relevant pan scenario.
- Added a changelog entry describing the iOS Touch popover/context menu gesture fix.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/library/DIPS.Mobile.UI/Effects/Touch/iOS/TouchEffectTapGestureRecognizer.cs | Completes/terminates the recognizer state explicitly and defers command execution to avoid UIKit gesture-state leakage. |
| src/library/DIPS.Mobile.UI/Effects/Touch/iOS/TouchEffectGestureRecognizerDelegate.cs | Updates pan/touch simultaneous-recognition behavior and narrows when touch cancellation is applied. |
| CHANGELOG.md | Documents the iOS Touch fix in a new patch version entry. |
eirinsvi
approved these changes
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of Change
Fixes an iOS gesture state issue where opening a popover or context menu from
Touch.Commandcould leave scrolling and swipe-back gestures broken after the overlay was dismissed.The root cause was that the custom
TouchEffectTapGestureRecognizerexecuted the tap command directly fromTouchesEndedwithout first completing/failing its own UIKit recognizer state. If that command opened a popover, UIKit could enter the presentation/dismissal flow while the Touch recognizer was still part of the active touch sequence.This change makes the Touch recognizer explicitly set
Ended,Failed, orCancelled, and defers command execution to the next main-thread turn so UIKit gets a clean gesture boundary before the popover/context menu opens.It also removes the previous broad Touch + pan simultaneous-recognition workaround because that was a band-aid: it reduced symptoms around scroll gestures but did not fix the fundamental recognizer lifecycle issue. The existing overlay blocker that prevents taps behind open popovers/context menus is kept, since that behavior is still needed and separate from the pan-state bug.
Todos