Skip to content

fix(android): null keyboardType shows the default text keyboard - #11576

Merged
NathanWalker merged 1 commit into
mainfrom
fix/android-null-keyboard-type
Oct 28, 2026
Merged

NathanWalker merged 1 commit into
mainfrom
fix/android-null-keyboard-type

Conversation

@NathanWalker

Copy link
Copy Markdown
Contributor

PR Checklist

What is the current behavior?

On Android, setting keyboardType to null on a TextField or TextView means the soft keyboard and caret never appear. The fallback branch converts the value with +value, and +null is 0, which is InputType.TYPE_NULL. On iOS the same 0 happens to be UIKeyboardType.Default, so this only breaks on Android. It comes up whenever a wrapper component sets keyboardType dynamically and uses null as its "no preference" value.

What is the new behavior?

null and undefined fall back to InputType.TYPE_CLASS_TEXT, the same default unknown names already get. Explicit numeric input types, including 0 / TYPE_NULL, are still passed through unchanged.

A new spec, ui/editable-text-base/index.android.spec.ts, covers null/undefined, unknown names, numeric passthrough, and named types. It fails without the fix.

Closes #9194.

@nx-cloud

nx-cloud Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit c5915ba

Command Status Duration Result
nx run-many -t build -p core,webpack5,vite ✅ Succeeded 23s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-10-23 19:37:13 UTC

@pkg-pr-new

pkg-pr-new Bot commented Oct 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nativescript/core@11576
npm i https://pkg.pr.new/@nativescript/vite@11576
npm i https://pkg.pr.new/@nativescript/webpack@11576

commit: c5915ba

@NathanWalker
NathanWalker merged commit a674ec0 into main Oct 28, 2026
10 checks passed
@NathanWalker
NathanWalker deleted the fix/android-null-keyboard-type branch October 28, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android: Setting null KeyboardType on TextView causes no keyboard/input.

1 participant