Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [61.5.2]
- [Touch][iOS] Fixed popovers and context menus opened from `Touch.Command` breaking scrolling and swipe-back gestures after dismissal.

## [61.5.1]
- [Touch][iOS] Fixed scroll gestures on tappable rows getting stuck after dismissing context menus or picker popovers, and prevented taps behind open overlays from activating touch commands.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ public override bool ShouldRecognizeSimultaneously(UIGestureRecognizer gestureRe
UIGestureRecognizer otherGestureRecognizer)
{
if (gestureRecognizer is TouchEffectTapGestureRecognizer touchGesture &&
otherGestureRecognizer is UIPanGestureRecognizer)
otherGestureRecognizer is UIPanGestureRecognizer &&
otherGestureRecognizer.State == UIGestureRecognizerState.Began)
{
TouchPlatformEffect.HandleTouch(UIGestureRecognizerState.Cancelled, ref touchGesture.m_currentState,
gestureRecognizer.View);
return false;
}

return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,26 @@ public override void TouchesBegan(NSSet touches, UIEvent evt)
public override void TouchesEnded(NSSet touches, UIEvent evt)
{
base.TouchesEnded(touches, evt);

if(!m_longPressDetected && m_currentState is not UIGestureRecognizerState.Cancelled)
m_onTap.Invoke();

var shouldInvokeTap = !m_longPressDetected && m_currentState is not UIGestureRecognizerState.Cancelled;

TouchPlatformEffect.HandleTouch(UIGestureRecognizerState.Ended, ref m_currentState, m_uiView);
m_longPressDetected = false;

State = shouldInvokeTap ? UIGestureRecognizerState.Ended : UIGestureRecognizerState.Failed;

if (shouldInvokeTap)
{
MainThread.BeginInvokeOnMainThread(m_onTap);
}
}

public override void TouchesCancelled(NSSet touches, UIEvent evt)
{
base.TouchesCancelled(touches, evt);

TouchPlatformEffect.HandleTouch(UIGestureRecognizerState.Cancelled, ref m_currentState, m_uiView);
State = UIGestureRecognizerState.Cancelled;
m_longPressDetected = false;
}

Expand All @@ -76,6 +83,7 @@ public override void TouchesMoved(NSSet touches, UIEvent evt)
{
TouchPlatformEffect.HandleTouch(UIGestureRecognizerState.Cancelled, ref m_currentState, m_uiView);
m_isCancelled = true;
State = UIGestureRecognizerState.Failed;
Comment thread
Vetle444 marked this conversation as resolved.
}

base.TouchesMoved(touches, evt);
Expand Down