Add runtime warning for unsupported keyboardType #15778
Open
Nitin-100 wants to merge 2 commits intomicrosoft:0.82-stablefrom
Open
Add runtime warning for unsupported keyboardType #15778Nitin-100 wants to merge 2 commits intomicrosoft:0.82-stablefrom
Nitin-100 wants to merge 2 commits intomicrosoft:0.82-stablefrom
Conversation
added 2 commits
March 16, 2026 08:34
Contributor
|
We dont do this for the 10s (100s?) of other properties that do not work on windows. Android/iOS also do not generally warn if you use a platform specific property on those platforms. Ex: using tabIndex on iOS does not cause any kind of warning, it's just silently ignored. The code also appears to run in production, so it's causing additional work in production apps. Also, this will cause debug output spam, which apps may want to have more control over. - If every component outputs to debug then it becomes hard to see anything. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Adds a runtime warning when developers use the
keyboardTypeprop on TextInput in React Native Windows Fabric. This prop is not yet functional due to Windows platform limitations with the Touch Keyboard and windowless RichEdit controls.What
Added a warning mechanism in
WindowsTextInputComponentView.cppthat:keyboardTypeis set to any value other than"default"Files Changed
vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cppCode Added
And the warning check in
updateProps:Why
The
keyboardTypeprop is accepted by the TextInput component but has no effect on Windows Fabric. Without this warning, developers may not realize the prop isn't working, leading to confusion when the Touch Keyboard layout doesn't change as expected on iOS/Android.Technical Background
ITextInputScopeto determine keyboard layoutHow
The warning is implemented using:
std::unordered_setto track emitted warnings (prevents spam)OutputDebugStringAto output to Visual Studio debug consoleWhen Warning Appears
The warning is shown:
keyboardTypemounts or updatesWarning Message Example
Testing
keyboardType="number-pad"Test Code
Microsoft Reviewers: Open in CodeFlow