microsoft / microsoft/react-native-windows
XBOX keyboard does not dismiss when controller start button is pressed.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 17.3k
- Forks
- 1.2k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Description
Environment
If you are using latest version:
react-native -v: error unknown option -vreact-native run-windows --info:
System:
OS: Windows 10 10.0.18363
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 4.38 GB / 15.72 GB
Binaries:
Node: 12.10.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.21.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.10.3 - C:\Program Files\nodejs\npm.CMD
npmPackages:
react: 16.9.0 => 16.9.0
react-native: https://github.com/microsoft/react-native/archive/v0.60.0-microsoft.35.tar.gz => 0.60.0-microsoft.35
react-native-windows: 0.60.0-vnext-headlessjs.112 => 0.60.0-vnext-headlessjs.112
rnpm-plugin-windows: ^0.3.5 => 0.3.9
Installed UWP SDKs:
10.0.16299.0
10.0.17763.0
10.0.18362.0
Then, specify:
- Target Platform Version(s): 10.0.18362.0
- Target Device(s): Xbox
- Visual Studio Version: 2019
- Build Configuration:
- Debug / x64 / Local Machine for dev
- Release / x64 / Remote Machine on XBOX
Steps to Reproduce
(On XBOX)
- Create
<TextInput />element - Navigate to
<TextInput /> - Press "A" on the controller to open Keyboard
- Press start on the controller
Expected Behavior
When start button pressed, the keyboard will dismiss, just like it dismisses in an HTML view on the XBOX when start is pressed in an input with a submit form action.
Actual Behavior
Keyboard stays open and active.
Another element cannot gain focus until the users presses "B" to close Keyboard, and then pressing Start will still not trigger onKeyPress callback correctly (as it pops up a context menu).
Depending on which event you use OnEndEditing, OnSubmitEditing, OnKeyPress looking for "Enter", or a combination to try and "brute force" it, the other element will sometimes gain focus while the keyboard is still open. But focus will then shift back to the original element very quickly.
react-native run-windows --logging
I don't run my project this way.
I run it via a package.json script which is node node_modules/react-native/local-cli/cli.js start
Starts metro bundler, then I run the app in Visual Studio 2019 alongside React Native Debugger standalone.
Additional context
The start button will indeed trigger an onKeyPress event, and you can even get "Enter" from event.nativeEvent.key, but the issue seems to be the keyboard not dismissing, and no way to manually dismiss it that I could find.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source files or tests. Start with the Xbox TextInput and keyboard/input-handling path, using the listed reproduction steps and environment. Done means pressing the controller Start button dismisses the keyboard and leaves focus usable for another element without requiring B.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native
- Domain
- game-dev, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100