Ionic version:
[x] 4.6.2 | 4.1
Current behavior:
the android back button reboots doom when it is in the last component
Gif
Expected behavior:
Close app
Steps to reproduce:
Other information:
I noticed the error when I was developing my app and I stopped at the root page and press the button back. Apart from this, it is not detecting the backbutton subscribe
Ionic info:
Ionic:
Ionic CLI : 5.0.1 (/usr/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.6.2
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1
Cordova:
Cordova CLI : 9.0.0 ([email protected])
Cordova Platforms : android 8.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.0.1, (and 24 other plugins)
Utility:
cordova-res : not installed
native-run : 0.2.7
System:
Android SDK Tools : 26.1.1 (/home/juan/Android/Sdk)
NodeJS : v11.15.0 (/usr/bin/node)
npm : 6.10.0
OS : Linux 4.19
Hi there. The hardware back button was not imported in the app.tsx after the minify with arrow functions.
I`m providing a pull request.
Hi @tntwist thanks for your contribution, how could you test your contribution of the ionic core? or I have to wait for the approval of the pull request. Thank you
Hi @Juanperezc. You can clone the ionic repo and then make the appropriate changes (See #18794 ) in your local clone. After this you can build the ionic core package manually and copy the contents of the resulting dist folder to the node_modules folder of ionic core in your app. I know it麓s a bit dirty though you can get the hardware back button working again without waiting for an update of ionic.
Hi @tntwist, would it be too much to ask how I do it?
Hi @SidiBecker,
here is a little guide for you:
git clone https://github.com/ionic-team/ionic or git clone url-to-your-fork and change the directory to the cloned repo (cd ionic)git checkout v4.6.2npm install in the base directory of the cloned reponpm install againnpm run-script buildCaution: Modifying your node_modules is a pretty dirty way and could result in other bugs/unexpected behaviors. I recommend you wait for the next offical release and just update your package.json reference of ionic.
Thank you so much @tntwist!
You're welcome @SidiBecker :)
Thank you so much, its work for me, waiting for the new version v4.6.3
Thank you so much @tntwist
Thanks! This has been fixed and will be available in the Ionic 4.7.0 release.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Most helpful comment
Hi @SidiBecker,
here is a little guide for you:
git clone https://github.com/ionic-team/ionicorgit clone url-to-your-forkand change the directory to the cloned repo (cd ionic)git checkout v4.6.2npm installin the base directory of the cloned reponpm installagainnpm run-script buildCaution: Modifying your node_modules is a pretty dirty way and could result in other bugs/unexpected behaviors. I recommend you wait for the next offical release and just update your package.json reference of ionic.