Skip to content

Fix crash with samsung keyboard when using password textboxes #18793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2025

Conversation

emmauss
Copy link
Contributor

@emmauss emmauss commented May 5, 2025

What does the pull request do?

Fix a crash on samsung keyboards on android when using password textbox. Internally, samsung keyboard casts the ICharSequence returned in all extracted text to a Java.Lang.String type, but only when the input connection is initialized with password input type. We previously returned SpannableString, which though is an ICharSequence, is not a Java.Lang.String, thus crashing the ime. We now return a Java.Lang.String. We weren't applying spans to out returning strings, so no functional difference between the two string types.

Other imes were and are not affected by the type returned.

What is the current behavior?

What is the updated/expected behavior with this PR?

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

Fixes #18772

@emmauss emmauss added os-android backport-candidate-11.3.x Consider this PR for backporting to 11.3 branch labels May 5, 2025
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 12.0.999-cibuild0056368-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added the bug label May 6, 2025
@maxkatz6 maxkatz6 added this pull request to the merge queue May 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 6, 2025
@emmauss emmauss added this pull request to the merge queue May 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 6, 2025
@emmauss emmauss added this pull request to the merge queue May 6, 2025
Merged via the queue into master with commit f0b1a83 May 6, 2025
12 checks passed
@emmauss emmauss deleted the android_samsung_ime_fix branch May 6, 2025 13:52
@MrJul MrJul added backported-11.3.x and removed backport-candidate-11.3.x Consider this PR for backporting to 11.3 branch labels Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TextInputOptions.ContentType="Password" causes Samsung Keyboard to stop responding
4 participants