unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.97k stars 730 forks source link

[wasm] FlipView does not increase SelectedIndex when swiping on mobile devices #15277

Closed ryanwin98 closed 6 months ago

ryanwin98 commented 9 months ago

Current behavior

When using swipe controls to go between items in the FlipView the SelectedIndex does not update. This causes issues such as the PipsPager not updating correctly

Expected behavior

The SelectedIndex should update when swiping between items in the FlipView

How to reproduce it (as minimally and precisely as possible)

https://github.com/unoplatform/uno/assets/104783204/9ff91e71-0b36-4cc0-8794-0c8cfea4d70b

  1. Launch an application with FlipView on wasm
  2. In the browser dev tools, select device emulation
  3. Use the swipe controls to go through items in the FlipView

Workaround

N/A

Works on UWP/WinUI

None

Environment

Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia

NuGet package version(s)

5.1.0-dev.1377

Affected platforms

WebAssembly

IDE

Visual Studio 2022

IDE version

17.8.5

Relevant plugins

No response

Anything else we need to know?

No response

Youssef1313 commented 9 months ago

This could be a regression from https://github.com/unoplatform/uno/pull/14491

jeromelaban commented 9 months ago

@ryanwin98 can you validate if this is a regression by checking if some of the early Uno 5.0 builds have this issue?

ryanwin98 commented 9 months ago

@jeromelaban rolled by to some earlier version of 5.1 and still viewed this bug, currently downgrading the project to see it the issue still exists in 5.0

ryanwin98 commented 9 months ago

@jeromelaban downgraded to 5.0.19 and i was still facing the same issue

jeromelaban commented 9 months ago

Thanks. Have you also tried the latest builds of 5.2-dev? It may show differences.

ryanwin98 commented 9 months ago

@jeromelaban upgraded to 5.2.0-dev.426 and the issue is still present

Youssef1313 commented 6 months ago

This is a regression from https://github.com/unoplatform/uno/pull/14491

Youssef1313 commented 6 months ago

The original root cause for #14488 is wrong IsIntermediate value (we hardcode it to false):

https://github.com/unoplatform/uno/blob/f632b08e8d980326001d3b5da7a64c72a8ee8dd5/src/Uno.UI/UI/Xaml/Controls/ScrollContentPresenter/ScrollContentPresenter.wasm.cs#L345-L354