Repository navigation
fix(textbox): keep TextBox from being scrolled away when focused with a touch pointer - #20155
Conversation
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-20155/index.html |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-20155/index.html |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-20155/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-20155/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-20155/docs/index.html |
|
🤖 Your WebAssembly Sample App 2 stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-20155/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-20155/docs/index.html |
92e432d to
dd89bc9
Compare
|
🤖 Your WebAssembly Sample App 2 stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-20155/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-20155/docs/index.html |
|
|
There was a problem hiding this comment.
Pull Request Overview
This PR addresses the issue where a TextBox gets scrolled away when focused with a touch pointer by refining the snapping behavior in ScrollViewer and its associated components. Key changes include:
- Introducing a ClampOffsetsToFocusedTextBox method for the SKIA implementation.
- Updating snap point logic to include a new condition for snapping to a focused TextBox.
- Adding a regression test to verify that a touch-focused TextBox remains visible.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.skia.cs | Adds a new method to adjust offsets based on the focused TextBox. |
| src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.cs | Updates presenter scrolled logic to incorporate touch TextBox snapping. |
| src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.SnapPoints.cs | Applies the clamp offsets method conditionally on SKIA builds. |
| src/Uno.UI/UI/Xaml/Controls/ScrollContentPresenter/ScrollContentPresenter.Managed.cs | Adjusts inertia behavior to correctly consider snapping when a TextBox is focused. |
| src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_TextBox.skia.cs | Introduces a new UI test ensuring a touch-focused TextBox is not scrolled away. |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-20155/docs/index.html |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-20155/wasm-skia-net9/index.html |
|
|
…box_into_view fix(textbox): keep TextBox from being scrolled away when focused with a touch pointer
GitHub Issue (If applicable): closes https://github.com/unoplatform/uno-private/issues/1164
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information
Internal Issue (If applicable):