Repository navigation
fix: Further improvements for softkeyboard Enter key - #23272
Conversation
There was a problem hiding this comment.
Pull request overview
Improves software keyboard Enter-key handling for WASM Skia on Android, so that focus-navigation patterns such as AutoFocusNext work in browsers whose virtual keyboards report keydown as keyCode 229 ("Unidentified"). A keyup-based fallback raises the managed Enter KeyDown when the keydown path didn't, guarded against double-dispatch on desktop/iOS by a new flag. The companion C# change replaces an Enum.IsDefined-based lowercase mapping with an explicit enterkeyhint mapping that excludes Apple-only/Default values that have no HTML equivalent.
Changes:
- Add
enterHandledByKeyDownflag set in keydown for Enter on non-multiline inputs. - In keyup, when Enter is reported and the flag isn't set (Android case), call
OnEnterKeyPressed()to raise managed KeyDown. - Replace switch-default
Enum.IsDefinedmapping with explicit per-value mappings; Apple-only and Default values now return empty string.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Uno.UI.Runtime.Skia.WebAssembly.Browser/ts/Runtime/BrowserInvisibleTextBoxViewExtension.ts | Adds keyup-based Enter dispatch fallback for Android with double-dispatch guard flag. |
| src/Uno.UI/UI/Xaml/Controls/TextBox/InputReturnTypeExtensions.wasm.cs | Replaces reflection-style enterkeyhint mapping with explicit per-value cases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23272/wasm-skia-net9/index.html |
|
The build 212562 found UI Test snapshots differences: Details
|
|
|
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
screen.mp4 |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23272/wasm-skia-net9/index.html |
|
The build 212624 found UI Test snapshots differences: Details
|
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23272/wasm-skia-net9/index.html |
|
The build 212941 found UI Test snapshots differences: Details
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23272/wasm-skia-net9/index.html |
|
The build 213430 found UI Test snapshots differences: Details
|
GitHub Issue: closes #22232
PR Type:
🐞 Bugfix
What changed? 🚀
PR Checklist ✅
Screenshots Compare Test Runresults.