Unexpected Focus Behavior in ScrollViewer with TextBoxes #18303
Replies: 5 comments 6 replies
-
Is this behavior also happening on WinUI, or just Uno targets? |
Beta Was this translation helpful? Give feedback.
-
There is no 'net8.0-desktop' in your project. <Project Sdk="Uno.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst;net8.0-windows10.0.19041</TargetFrameworks> |
Beta Was this translation helpful? Give feedback.
-
Focus goes to the NavigationBar. The first group of textboxes are included inside a ScrollViewer -> ScrollViewer -> StackPanel -> TextBoxes, so when you click outside the TextBox but inside the second ScrollViewer, focus goes to the first focusable element inside the ScrollViewer. The second group lies inside the first ScrollViewer -> StackPanel, when you click outside the TextBox focus goes to the NavigationBar that is the first focusable element of the first ScrollViewer. focus.mp4 |
Beta Was this translation helpful? Give feedback.
-
Setting the |
Beta Was this translation helpful? Give feedback.
-
As this behavior matches WinUI, I'm closing for now, unless a discrepancy is found. |
Beta Was this translation helpful? Give feedback.
-
I'm encountering an issue with a ScrollViewer that contains multiple TextBoxes in a StackPanel. When I focus on one of the TextBoxes and then click on an empty area within the ScrollViewer, the focus unexpectedly shifts back to the first TextBox in the ScrollViewer.
I’ve been unable to determine the cause of this behavior and would appreciate any insights.
There are two ScrollViewers and two StackPanels in my layout, which are similar in structure. However, this unwanted scrolling behavior only occurs in FormStackPanel or FormSV.
Structure of ScrollViewer
UnoApp5 (2).zip
Screen.Recording.2024-09-26.120515.mp4
Beta Was this translation helpful? Give feedback.
All reactions