Skip to content

How to get focus on the Touchable component when the modal is opened? #22

@marabej

Description

@marabej

Hi
Exscuse me for the duplicate post, I made a mistake

I have two questions?

  1. How to get focus on the Touchable component when the modal is opened.
    for example:
    Let's create a modal from a TouchableHighlight
<TouchableHighlight onPress={()=>{
  let modal = new ModalManager(<View style={modal container style}>
    <TouchableHighlight><Text>Button 1</Text></TouchableHighlight>
    <TouchableHighlight><Text>Button 2</Text></TouchableHighlight>
  </View>);
}}>
  <Text>Open Modal</Text>
</TouchableHighlight>

If there is no a touch screen, but the user has a physical keyboard, d-pad or TV Remote,
How Can we make the Button 1 to get auto focussed when the modal is opened?

  1. How can we force the focus to stay inside the modal?
    React-native have an excellent ability to move the focus between touchable components with
    D-pad, TV Remote or physical Keyboard (arrows), but the opened modal behaves like a part of the parent. It should be like a trully modal

best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions