unoplatform / Uno.Themes

This library is designed to help you use the Material, Fluent or Cupertino design system with the Uno Platform
https://platform.uno
Apache License 2.0
170 stars 32 forks source link

[Gallery][WASM] Occasional Unintended Text Selection After Component Switch #1459

Open jhanvi03 opened 2 months ago

jhanvi03 commented 2 months ago

Current behavior

When switching from one component to another via the side menu and then returning to a textbox, the text within the textbox is occasionally pre-selected.

https://github.com/user-attachments/assets/f3ffa846-f580-45dc-9322-d63173b1c8bc

Screenshot 2024-08-21 at 11 55 29 AM

Expected behavior

When returning to the textbox after navigating between components, the text should remain unselected

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

  1. Open Gallery Canary WSM.
  2. From the side menu, expand UI Components and click on Textbox.
  3. Observe that no text is automatically selected in the textbox.
  4. Now, switch to a different component from the side menu, then return to the Textbox component.
  5. Notice that upon returning, the text in the textbox appears to be automatically selected.

Environment

Nuget Package:

Package Version(s):

Affected platform(s):

Anything else we need to know?

Could be related to : https://github.com/unoplatform/uno/pull/17633 , https://github.com/unoplatform/uno/issues/17914

MartinZikmund commented 2 months ago

@Youssef1313 @ramezgerges does this look familiar?

ramezgerges commented 2 months ago

This is actually a duplicate of https://github.com/unoplatform/uno/issues/13440. The repro is not component switching, but double clicking. I suspect @jhanvi03 mistakenly double clicked on the "TextBox" item while switching between components.

kazo0 commented 2 months ago

@jhanvi03 can you double check this and maybe sync with @ramezgerges / @MartinZikmund to see if this is perhaps related to the double-click issue?

jhanvi03 commented 2 months ago

Tested using mouse pad and mouse, occasionally I am able to reproduce with single click. Also, with double click on component, the entire section is getting selected. Version:

Package Referenced version Updated version
Uno.Core.Extensions.Compatibility 4.0.1 4.1.1
Uno.Core.Extensions.Disposables 4.0.1 4.1.1
Uno.Sdk 5.3.96 5.4.0-dev.236
jhanvi03 commented 1 month ago

Using the latest Canary version, I encountered the same issue when I navigated to Menu -> Community Toolkit -> DataGrid. Upon a single click, the data was selected unexpectedly.

Versions: Package Referenced version Updated version Uno.CommunityToolkit.WinUI.UI.Controls 7.1.200 7.1.203 Uno.CommunityToolkit.WinUI.UI.Controls.DataGrid 7.1.200 7.1.203 Uno.Core.Extensions.Compatibility 4.0.1 4.1.1 Uno.Core.Extensions.Disposables 4.0.1 4.1.1 Uno.Sdk 5.3.96 5.6.0-dev.16

Screenshot 2024-10-17 at 9 27 18 AM