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

[BUG] iOS: Slider unresponsive if parent view has TouchBehavior #2358

Open
2 tasks done
jurganson opened this issue Nov 25, 2024 · 1 comment
Open
2 tasks done

[BUG] iOS: Slider unresponsive if parent view has TouchBehavior #2358

jurganson opened this issue Nov 25, 2024 · 1 comment
Labels
bug Something isn't working unverified

Comments

@jurganson
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

The first tap and drag works, however after that the slider remains unresponsive.
https://github.com/user-attachments/assets/accc4a03-2ab6-49a1-9b89-1e124b76719f

Expected Behavior

The Slider should work regardless of a behavior in the parent view.

Steps To Reproduce

  1. Open and run the reproduction repo on a iOS device
  2. Observe the bug

Link to public reproduction project repository

https://github.com/jurganson/iOS_Slider_Broken_Inside_TouchBehavior_View

Environment

- .NET MAUI CommunityToolkit: 8.0.1
- OS: iOS
- .NET MAUI: 8.0.4

Anything else?

No response

@jurganson jurganson added bug Something isn't working unverified labels Nov 25, 2024
@jurganson
Copy link
Author

As a workaround, it seems like setting DelaysTouchesEnded in the general UIGestureRecognizer fixes the issue:

Changes done in this file:

sealed class TouchUITapGestureRecognizer : UIGestureRecognizer
	{
		readonly TouchBehavior behavior;

		float? defaultRadius;
		float? defaultShadowRadius;
		float? defaultShadowOpacity;
		CGPoint? startPoint;

		bool isCanceled;

		public TouchUITapGestureRecognizer(TouchBehavior behavior)
		{
			this.behavior = behavior;
			CancelsTouchesInView = false;

                        // Workaround
			DelaysTouchesEnded = false; // *Fixes* the github issue
			DelaysTouchesBegan = false; // *Fixes* similar issues with Slider in own project

			Delegate = new TouchUITapGestureRecognizerDelegate();
		}

  ... 

So it seems like the UIGestureRecognizer is not allowing for the Up event to pass down to its subsequent view, because it gets stuck in validating if it can consume it - even though we allow it to pass it down using CancelsTouchesInView. Could there internally be happening an error in Xamarin.iOS which causes the Up event to get 'stuck'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unverified
Projects
None yet
Development

No branches or pull requests

1 participant