Skip to content

Conversation

@Monika4841
Copy link
Collaborator

Bug Description

  • On iOS devices using .NET MAUI 10, the SfPullToRefresh control starts the progress bar when pulling down to refresh, but it gets stuck and doesn't complete the refresh when used with CollectionView, SfListView or DataGrid.

Root Cause

  • The OnTouch method is not triggered on iOS because the PullToRefresh gesture is not recognized. Once the OnTouch method is called, the pointer action should update to the Moved state. In this state, the progress rate is expected to increase. Therefore, for the refresh functionality to work correctly. So, the OnTouch method must be triggered.

Solution Description

  • In the ShouldRecognizeSimultaneousGesture method, returning false allows only one gesture to be recognized. In .NET 9, the PullToRefresh gesture was recognized correctly, and the OnTouch method was triggered as expected.
  • However, in .NET 10 on iOS, returning false causes the system to recognize only the ScrollView gesture in CollectionView, SfListView or DataGrid, and not the PullToRefresh gesture. As a result, the refresh operation gets stuck because the OnTouch method is never triggered.
  • By returning true in the ShouldRecognizeSimultaneousGesture method, both gestures are now recognized simultaneously, allowing the PullToRefresh functionality to work correctly.

Task ID
Bug 989598

Before Changes

PullToRefresh_Issue.mp4

After Changes

PullToRefresh_Fix.mp4

MR CheckList

  • Have you ensured in iOS, Android, WinUI, and macOS(if supported)? iOS and macOS
  • If there is any API change, did you get approval from PLO through JIRA Tasks? No
  • Is there any existing behavior change of other features due to this code change? No
  • Did you perform the automation / manual testing against your fix?
  • Did you record this case in the unit test or UI test?
  • Have you suppressed any warning or binding errors? No
  • Is there any existing behavior change of other features due to this code change? No
  • Does it need localization? If so did you ensure the cases mentioned in this link? No
  • Whether the new APIs and its comments are added as per standard? No
  • Did you ensure the cases mentioned in this link? Not Applicable
  • Did you ensure the fix (if applicable) met accessibility requirements? Not Applicable
  • If you added any interaction related code, have you used touch and gesture APIs from core project? Not Applicable
  • Does it contain code that reflects any internal framework API? Not Applicable
  • Did you ensure the cases mentioned in this link? Not Applicable
  • Did you ensure RTL? Not Applicable
  • Did you test the memory leak with the fix? Not Applicable
  • Did you ensure the ? Check this link to know more about performance optimization and how to automate? Not Applicable
  • If you use a third-party package, did you get approval to use it? If not, please get approval before merging. Not Applicable

@Monika4841 Monika4841 changed the title Bug[989598] - SfPullToRefresh gets stuck during pulling inside Collec… Bug[989598] - SfPullToRefresh gets stuck during pulling inside CollectionView, SfListView or SfDataGrid in ios Nov 7, 2025
Copy link
Collaborator

@RasikaPalanisamy RasikaPalanisamy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes are fine.

Copy link
Collaborator

@FarjanaParveen FarjanaParveen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes are fine.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug in .NET MAUI 10 where the SfPullToRefresh control gets stuck during the refresh operation when used with CollectionView, SfListView, or SfDataGrid on iOS and macOS platforms.

Key Changes:

  • Added conditional logic for .NET 10+ on iOS to allow simultaneous recognition of both the PullToRefresh gesture and the ScrollView gesture, resolving a regression where returning false caused only the ScrollView gesture to be recognized, blocking the PullToRefresh functionality.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}
}

#if NET10_0_OR_GREATER && IOS
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conditional compilation directive only includes IOS, but since this fix is tested on both iOS and macOS (as mentioned in the PR checklist), it should also include MACCATALYST. MacCatalyst apps also use UIKit and would likely experience the same gesture recognition issue on .NET 10.

Consider changing to:

#if NET10_0_OR_GREATER && (IOS || MACCATALYST)

This pattern is consistent with other conditional compilation in the codebase (e.g., Accordion/Helper/AccordionScrollView.cs:9).

Suggested change
#if NET10_0_OR_GREATER && IOS
#if NET10_0_OR_GREATER && (IOS || MACCATALYST)

Copilot uses AI. Check for mistakes.
@PaulAndersonS PaulAndersonS merged commit 0888c78 into main Nov 19, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants