Mouse gets stuck on SfListView when entry inside row.

Hi,

We have a Maui app that uses a TabView that loads the templates from xaml files.

I have noticed a bug in the SfListView inside of the Templates. When I have a SfListView with an "Entry" inside of the ItemTemplate then I notice that the mouse gets stuck after clicking on the row. When you remove the "Entry code then the mouse doesnt get suck.  I have only noticed this in Windows, I'm not sure if the same happens on Android.


I have attatched the project as a zip file.

Can you please investigate and let me know if it is a bug or if there is a fix.

Thanks,
Mark

Attachment: SyncfusionTest_SfListView_863dd807.zip

8 Replies

MA Mark February 7, 2025 08:54 AM UTC

I am trying to add more info but keep getting told my input is too long. I have attatched more info as a Word Document.


Attachment: Syncfusion_ticket_2e5b4861.zip


MA Mark February 7, 2025 09:22 AM UTC

I can confirm that this happens on Windows and not on Android.



SJ Sowntharya Jayamoorthy Syncfusion Team February 10, 2025 01:30 PM UTC

Hi Mark,


We have reviewed the reported issue using the sample you provided and were able to reproduce it. Specifically, after selecting a ListView item and moving the cursor, SfTabView swiping occurs unexpectedly. This happens because, once an item is pressed, the pointer is not released in SfTabView, leading to unintended tab swiping.

As a temporary workaround, if swiping within SfTabView is not required in your scenario, you may consider disabling tab swiping to prevent this behavior.

We are currently analyzing the issue at the source level and will provide further updates on or before February 14, 2025. We appreciate your patience until then.


Code snippet:

<tabView:SfTabView

  EnableSwiping="False" >

</ tabView:SfTabView>



Regards,

Sowntharya J.



SJ Sowntharya Jayamoorthy Syncfusion Team February 14, 2025 02:18 PM UTC

Hi Mark,

Thank you for your patience. As previously mentioned, touch gesture being passed to the parent view (TabView) when you select a ListView item. This causes the tabs to swipe unintentionally. By handling the ListView’s PointerPressed event and setting e.Handled to true, you can stop the touch gesture from being passed to the parent. This will ensure that swiping between tab contents does not occur when interacting with the ListView.  Please refer the following code snippet,

Code snippet:

<listView:SfListView

    x:Name="AdHocWithdrawalsListView" >

  <listView:SfListView.Behaviors>

    <behavior:ListViewBehaviour />

  </listView:SfListView.Behaviors>
</listView:SfListView>

 

// Behaviour.cs

 

    public class ListViewBehaviour : Behavior<SfListView>

    {

        private Template1ViewModel _viewModel;

        private SfListView _listView;

 

 

        protected override void OnAttachedTo(SfListView listView)

        {

            _listView = listView;

            listView.Loaded += OnListViewLoaded;

 

            base.OnAttachedTo(listView);

        }

 

        protected override void OnDetachingFrom(SfListView listView)

        {

            listView.Loaded -= OnListViewLoaded;

           

            _viewModel = null;

            _listView = null;

            base.OnDetachingFrom(listView);

        }

 

        private void OnListViewLoaded(object sender, ListViewLoadedEventArgs eventArgs)

        {

      

#if WINDOWS

            if (_listView.Handler != null)

            {

                if (_listView.Handler.PlatformView is UIElement nativeView)

                {

                    // Subscribe to the PointerPressed event

                    nativeView.PointerPressed += NativeView_PointerPressed;

                }

            }

#endif

        }

 

#if WINDOWS

        private void NativeView_PointerPressed(object sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)

        {

            e.Handled = true;

        }

#endif

 

    }

 



Regards,
Sowntharya J.


Attachment: SyncfusionTest_SfListView_863dd807(1)_7e10f6c2.zip


MA Mark February 17, 2025 09:00 AM UTC

Hi  Sowntharya,

I have applied this fix to our project and can confirm it works.


Will this be released as a nuget package fix?


Thanks,

Mark



SJ Sowntharya Jayamoorthy Syncfusion Team February 18, 2025 02:02 PM UTC

Hi Mark,

As mentioned in our previous updates, the touch gesture challenge arises when both child and parent elements have touch gestures. Specifically, we've been able to replicate this issue with StackLayout, where the PointerReleased action does not trigger if a child element also has a touch gesture. We suspect that it might be related to framework's side issue. So, we request you to utilize the workarounds provided in our previous updates to resolve the reported scenarios.

Regards,

Sowntharya J.



MA Mark February 18, 2025 02:06 PM UTC

Hi  Sowntharya,


The fix has been working perfectly. Thank you very much for your assistance.


Thanks,

Mark



SJ Sowntharya Jayamoorthy Syncfusion Team February 19, 2025 02:28 PM UTC

Hi Mark,

You are welcome! we glad to hear that the workaround has been working perfectly. If you need any further assistance, feel free to reach out.


Regards,
Sowntharya J.


Loader.
Up arrow icon