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.99k stars 730 forks source link

[Android] Controls on previous Page still clickable after navigation #17906

Open morning4coffe-dev opened 3 months ago

morning4coffe-dev commented 3 months ago

Current behavior

When a new Recommended app is created and the user navigates to a different page, the controls on the previous page remain clickable or interactive. This can result in unintended actions being triggered on the previous page, even though the user is no longer viewing it:

https://github.com/user-attachments/assets/f5825cd3-bb73-46a3-bd67-548989c7acef

Expected behavior

No response

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

  1. Create a new Recommended app
  2. Navigate in the app
  3. Click on the space where the button is on the previous page

Workaround

No response

Works on UWP/WinUI

Yes

Environment

No response

NuGet package version(s)

"Uno.Sdk": "5.3.96" or "Uno.Sdk": "5.4.0-dev.180"

Affected platforms

Android iOS? - not able to test

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

MartinZikmund commented 2 months ago

The recommended template has

 Background="{ThemeResource $themeBackgroundBrush$}"

Which in case of Material becomes ThemeResource BackgroundBrush - does this brush exist in Material?

Not sure if relevant, but just seemed interesting

jeromelaban commented 2 months ago

/cc @kazo0

kazo0 commented 2 months ago

@MartinZikmund yes BackgroundBrush should be a valid material brush

MartinZikmund commented 2 months ago

@jeromelaban According to investigation by @Youssef1313, pre-requisite to fixing this is https://github.com/unoplatform/uno/pull/17645 - this one feels quite urgent though, as it could mean people will accidentally click and trigger operations on previous pages in navigation stack as things stand.

Youssef1313 commented 2 months ago

To add a bit of into. This seems like a ContentControl/ContentPresenter bug. I have a PR to align ContentControl/ContentPresenter on Skia which is blocked on TemplatedParent. So, after TemplatedParent is merged I could try to get my PR to be for all platforms rather than Skia only