Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 6, 2026

  • Understand the issue: Backspace key not working on WASM Skia for PasswordBox and sometimes TextBox on Android
  • Identify root cause in BrowserInvisibleTextBoxViewExtension.ts
  • Fix the onkeydown handler to not prevent Backspace and Delete key default behavior
  • Build and test the fix locally - Build succeeded
  • Verify no regressions in existing tests - Tests passed
  • Address review feedback: Exclude Ctrl/Cmd+Backspace/Delete from browser handling to preserve word deletion functionality
  • Include Alt modifier check for macOS Option+Backspace/Delete word deletion
Original prompt

This section details on the original issue you should resolve

<issue_title>[WASM Skia] Backspace key does not work (TextBox, PasswordBox)</issue_title>
<issue_description>### Current behavior 🐛

Backspace soft keyboard key on Android never works on PasswordBox and sometimes does not work on TextBox. The easiest way to reproduce textbox failing is to enter text with spaces in it into a textbox and then try to backspace it:

Screen_Recording_20260104_222621_One.UI.Home.mp4

This was tested with Material theme but probably applies to all themes.

Expected behavior 🎯

Backspace button should work.

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

No response

Workaround 🛠️

No response

Renderer 🎨

  • Skia
  • Native

Affected platforms 📱💻🖥️

WebAssembly

Uno.Sdk version (and other relevant versions) 📦

6.4.53, 6.5.0-dev.100

IDE version 🧑‍💻

No response

Anything else we need to know? 💬

No response</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions bot added the platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform label Jan 6, 2026
@Jen-Uno Jen-Uno requested a review from Copilot January 6, 2026 18:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a critical bug where the Backspace key was not functioning correctly in TextBox and PasswordBox controls on WASM Skia, particularly affecting mobile soft keyboards on Android. The fix modifies the TypeScript keyboard event handler to allow Backspace and Delete keys to use the browser's default behavior rather than preventing it, ensuring that text deletion operations trigger properly through the oninput event.

Key Changes

  • Modified the onkeydown handler in BrowserInvisibleTextBoxViewExtension.ts to allow Backspace and Delete keys to pass through
  • Added early return logic before preventDefault() call for these specific keys
  • The browser's default behavior will now handle text deletion and propagate changes via the oninput event to managed code

Copilot AI changed the title [WIP] Fix backspace key functionality in TextBox and PasswordBox fix: Allow Backspace and Delete keys in WASM Skia TextBox/PasswordBox Jan 6, 2026
Copilot AI requested a review from Jen-Uno January 6, 2026 18:33
@Jen-Uno
Copy link
Contributor

Jen-Uno commented Jan 6, 2026

@copilot issue is solely with Android.

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22277/wasm-skia-net9/index.html

@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22277/docs/index.html

@Jen-Uno Jen-Uno marked this pull request as ready for review January 6, 2026 18:49
Copilot AI review requested due to automatic review settings January 6, 2026 18:49
@Jen-Uno Jen-Uno requested a review from ramezgerges January 6, 2026 18:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22277/wasm-skia-net9/index.html

@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-22277/docs/index.html

Comment on lines +103 to +105
if ((ev.key === "Backspace" || ev.key === "Delete") && !ev.ctrlKey && !ev.metaKey && !ev.altKey) {
return;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This issue needs to be tested manually before being merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[WASM Skia] Backspace key does not work (TextBox, PasswordBox)

5 participants