XamarinCommunityToolkit icon indicating copy to clipboard operation
XamarinCommunityToolkit copied to clipboard

[Bug] [iOS] TouchEffect conflicts with InteractivePopGestureRecognizer and kills page gestures

Open ThomasAdrian opened this issue 3 years ago • 0 comments

IOS only scenario: using a toucheffect on a view in a non-root page in the navigation stack (ie one that is subject to the NavigationController.InteractivePopGestureRecognizer = swipe to the right from the left hand side to pop the page)

Having a scrollable control (scrollview, listview, collectionview etc) and scrolling along the left hand side.

Description

Once the toucheffect has been activated, scrolling on the left hand edge of the scrollable control causes all gestures to die on the page ie the scroll dies and so does the "swipe right to pop page" gesture.

Stack Trace

n/a

Link to Reproduction Sample

https://github.com/ThomasAdrian/TouchTest

Steps to Reproduce

see above

Expected Behavior

page gestures should be unaffected by toucheffect execution

Actual Behavior

page gestures cease to work

Basic Information

  • Version with issue: latest
  • Last known good version: unknown
  • IDE: vs2022
  • Platform Target Frameworks:
    • iOS: 15.2
    • Android: n/a
    • UWP: unknown
  • Android Support Library Version: n/a
  • Nuget Packages:
  • Affected Devices: iphone 8 (15.2) physical, ipad air 2 (15.2) physical

Workaround

disable NavigationController.InteractivePopGestureRecognizer with custom page renderer:

namespace TouchTest.iOS { class CustomPageRenderer : PageRenderer { public override void ViewWillLayoutSubviews() { base.ViewWillLayoutSubviews();

        if (NavigationController != null)
        {
            NavigationController.InteractivePopGestureRecognizer.Enabled = false;
        }
    }
}

}

ThomasAdrian avatar Feb 09 '22 15:02 ThomasAdrian