Hey everyone, I'm currently in the process of developing a mobile application using phonegap. I'm facing an issue where I want to disable the functionality of the back button from navigating to the previous page. I simply want it to do nothing or stay on the same page without affecting the current one. I attempted to achieve this by using the following JavaScript code snippet, but unfortunately, it did not work for me. If anyone has an alternative solution to tackle this problem, please share it with me. Thank you in advance!
// This is how I attempted to override the back button, but it didn't work //
document.addEventListener('backbutton', function (e) {
e.preventDefault();
}, false );