-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Labels
BugHelp Wanted
Issues ideal for external contributors.Issues ideal for external contributors.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
Is this a bug report?
(Yes)
Have you read the Contributing Guidelines?
(Yes)
Environment
react-native -v
:
react-native-cli: 2.0.1
react-native: 0.47.1
node -v
:
v8.1.3
npm -v
:
5.0.3
yarn --version
:
0.27.5
Then, specify:
- Target Platform: Android
- Development Operating System: Windows10
- Build tools:
react-native run-android
Steps to Reproduce
(Write your steps here:)
class App extends Component {
componentDidMount() {
BackHandler.addEventListener('hardwareBackPress', this.onBackPress);
}
componentWillUnmount() {
BackHandler.removeEventListener('hardwareBackPress', this.onBackPress);
}
onBackPress = () => {
return true;
};
render() {
return (
<Text>Press back buton</Text>
);
}
}
If you run the code in development
environment , it don't works and when you press back button , app will be closed , but in development
environment if you turn on remote debug
, the code works well and app not closed
Expected Behavior
(Prevent closing app on back button pressed)
Actual Behavior
(On development
environment when remote debug
is off it don't woks but when remote debug
is on it works)
Reproducible Demo
(N/A)
joncursi, steffann, vegetarianlife, afilp, batmanhit and 12 more
Metadata
Metadata
Assignees
Labels
BugHelp Wanted
Issues ideal for external contributors.Issues ideal for external contributors.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.