Hi all! I’m trying to disable hardware back button. I know it’s not a good practise, but I need to do it. I have following code:
import { App as AppSys } from '@capacitor/app';
AppSys.addListener('backButton', data => {
console.log('hw back');
});
According to documentations:
Listening for this event will disable the default back button behaviour, so you might want to call
window.history.back()
manually
But it does not. I can see ‘hw back’ in log, but it does not disable default back button behaviour (it fires up log event and also it goes 1 step history back). What am I missing?