Resolved, my stupidity - Document.addEventListener to the backbutton stop working?


#1

Last time I did test this in my app (can not remember if it was before or after the last update) was still functioning normally, but now it was making changes and when pressed simply closed the application.

the code I use is this, within the app.js:

platform.ready().then(() => {
    document.addEventListener('backbutton', () => {
        let nav = this.app.getComponent('nav');
        nav.setRoot(this.homePage);
    }, false);
});

#2

the code is working well and had no problem, I did that mess here.