Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
OnDeviceBackButton properties and setDefaultDeviceBackButtonListener not working
-
Hello.
Please the ons.setDefaultDeviceBackButtonListener() method and the individual onDeviceBackButton page property does not work when i click my device back button for the first time, but they respond on subsequent clicks.
Please does anyone know what could be the cause of this?? Really desperate, I’ve been trying to debug this for over 2 hours.Thank you
-
@writeosahon Can you post some of your code?
-
@munsterlander unfortunately, the app is a commercial product and i’m bound by NDA/confidentiality agreements. Have you or anyone you know experienced this type of behaviour from the onDeviceBackButton property??
Thank you for assisting
-
@writeosahon I have seen it when programmers code it incorrectly. Usually, the eventListener is invoked at the wrong point in the application. We do not need to see protected code, but creating a codepen that demonstrates your issue or sanitized code is the only way we can assist better. I can confirm 100% that the backButton works as designed in multiple platforms so there will be something within the app that needs to be sorted out.
-
I am using angular2, and unable to figure out how to use onDeviceBackButton, or ons object.
Can anyone help me post some example?
And I feel like the onsen documentation is not really that well. Sorry.
Thank You
-
@abdul Did this help document not work? https://onsen.io/v2/docs/angular2/ons-back-button.html
-
This post is deleted!