facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.47k stars 24.26k forks source link

Question: onAccessibilityEscape example? #24270

Closed markbrown4 closed 5 years ago

markbrown4 commented 5 years ago

onAccessibilityEscape doesn't seem to be firing for the simplest use case on iOS. I'm using the 2 finger Z shaped scrub and no dice.

Is there a bug with it or am I not using it correctly?

class AccessibleApp extends React.Component {
  state = {
    escaped: false,
  };

  render() {
    return (
      <View style={{flex: 1}} accessible onAccessibilityEscape={() => this.setState({escaped: true})}>
        <Text>{`Escaped: ${this.state.escaped}`}</Text>
      </View>
    );
  }
}

In particular I'm trying to use it with the React Native's Modal component to dismiss but haven't managed to get it to do anything so far.

react-native-bot commented 5 years ago

We are automatically closing this issue because it does not appear to follow any of the provided issue templates.

👉 Click here if you want to report a reproducible bug or regression in React Native.

markbrown4 commented 5 years ago

🙄

estevaolucas commented 5 years ago

@markbrown4 I just tested it on my side, and it works (using your code).

will be called when someone performs the "escape" gesture, which is a two finger Z shaped gesture

with this gesture, onAccessibilityEscape is called.

markbrown4 commented 5 years ago

Yep, this was broken in 1.59 and fixed in 1.60