Skip to content

Commit

Permalink
Added workarounds for TextInputs (#2203)
Browse files Browse the repository at this point in the history
* Added workarounds for TextInputs

* provide info on the focus management using <Modal>

* small text tweaks

Co-authored-by: Bartosz Kaszubowski <[email protected]>
  • Loading branch information
EyMaddis and Simek authored Sep 10, 2020
1 parent 7d2d912 commit fadb0f1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/building-for-tv.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,8 @@ class Game2048 extends React.Component {
- _Known issues_:
- `TextInput` components do not work for now (i.e. they cannot receive focus, see [this comment](https://github.com/facebook/react-native/pull/16500#issuecomment-629285638)).
- `TextInput` components do not work for now (i.e. they cannot receive focus automatically, see [this comment](https://github.com/facebook/react-native/pull/16500#issuecomment-629285638)).
- It is however possible to use a ref to manually trigger `inputRef.current.focus()`.
- You can wrap your input inside a `TouchableWithoutFeedback` component and trigger focus in the `onFocus` event of that touchable. This enables opening the keyboard via the arrow keys.
- The keyboard might reset its state after each keypress (this might only happen inside the Android TV emulator).
- The content of `Modal` components cannot receive focus, see [this issue](https://github.com/facebook/react-native/issues/24448) for details.

0 comments on commit fadb0f1

Please sign in to comment.