-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 - CollectionView scroll sometimes stops working if swipeView is inside datatemplate #16856
Comments
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process. |
We are also experiencing this on a client app. When running on iOS the app appears to freeze when on a view that scrolls with swipe items. It happens intermittently when a swipe item is partially swiped while the view is scrolling, the entire view locks up until the swipe item is moved. Other views in the app continue to function but on return to the frozen view the view remains frozen. the only way to resolve is to either kill the entire app and reload or re-swipe the stuck item (this is not obvious to the user though as there is no visibly stuck swipe item) |
Here is a temporary work around using the Scrolled event of CollectionView. private bool isScrolling = false;
private double previousScrollY = 0;
void CollectionView_Scrolled(System.Object sender, Microsoft.Maui.Controls.ItemsViewScrolledEventArgs e)
{
if (!isScrolling)
{
isScrolling = true;
MainThread.BeginInvokeOnMainThread(() =>
{
foreach (var item in contacts.GetVisualTreeDescendants().OfType<CustomSwipeView>())
{
item.IsEnabled = false;
}
});
Dispatcher.StartTimer(TimeSpan.FromSeconds(0.5), () =>
{
if (previousScrollY == e.VerticalOffset)
{
isScrolling = false;
MainThread.BeginInvokeOnMainThread(() =>
{
foreach (var item in contacts.GetVisualTreeDescendants().OfType<CustomSwipeView>())
{
item.IsEnabled = true;
}
});
return false; // Stop the timer
}
previousScrollY = e.VerticalOffset;
return true; // Continue the timer
});
}
}
|
One MAUI bug nearly fixed, running into the next one. This is anoying. And again it is a bug preventing us to go live. The main view uses that CollectionView SwipeView combination. |
@Flais glad it helped you. But if you still face an issue with the workaround, you have to use Syncfusion's SFListView control. |
also experiencing same issue, please fix ASAP... |
Description
If you half swipe open a swipe view and then swipe it close it sometimes stops the collectionView from scrolling.
This scroll starts working again after using a swipe view again.
Tested on iOS and Android and can only see the issue on iOS
Steps to Reproduce
1.Create a collectionView
2.Set the DataTemplate to contain a SwipeView.
3.Half swipe a CollectionView Item.
4.Try to scroll the CollectionView
5. If you can Scroll retake steps 3 & 4 until it happens.
Link to public reproduction project repository
https://github.com/SamuelJames101/CollectionViewDataTemplateIssue
Version with bug
8.0.0-preview.7.8842
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iPhone 11 Pro, iOS 13.1.1
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: