Skip to content

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

Closed

Description

@jurganson

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

Activity

  1. jurganson commented on Nov 28, 2024

    @jurganson
    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'?

  2. locked and limited conversation to collaborators on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/behaviorsIssue/Discussion/PR that has to do with BehaviorsbugSomething isn't workingunverified

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions