Skip to content

Commit fadb0f1

Browse files
EyMaddisSimek
andauthored
Added workarounds for TextInputs (#2203)
* Added workarounds for TextInputs * provide info on the focus management using <Modal> * small text tweaks Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com>
1 parent 7d2d912 commit fadb0f1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

docs/building-for-tv.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,8 @@ class Game2048 extends React.Component {
155155
156156
- _Known issues_:
157157
158-
- `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)).
158+
- `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)).
159+
- It is however possible to use a ref to manually trigger `inputRef.current.focus()`.
160+
- 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.
161+
- The keyboard might reset its state after each keypress (this might only happen inside the Android TV emulator).
162+
- The content of `Modal` components cannot receive focus, see [this issue](https://github.com/facebook/react-native/issues/24448) for details.

0 commit comments

Comments
 (0)