mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 17:42:15 +08:00
fix(react): adding hardware back button support, fixes(19819) (#19851)
This commit is contained in:
@ -34,6 +34,13 @@ export class NavManager extends React.Component<NavManagerProps, NavContextState
|
||||
});
|
||||
});
|
||||
|
||||
if (document) {
|
||||
document.addEventListener('ionBackButton', (e: any) => {
|
||||
e.detail.register(0, () => {
|
||||
this.props.history.goBack();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
Reference in New Issue
Block a user