Ionic 4 - PWA Back Button not closing Modal


Any idea how to fix the back button, both the browser and the android physical button.
In v4 beta.16 when running as normal web page or PWA and a modal is opened then the back button does not close the modal but change the page in background! When you close the modal then you happen to be on a different page :frowning:


You could subscribe to the back event and close the modal aka override de default behavior

To do so you have two options:

  1. In the Platform there is a subscribeWithPriority (

  2. You could use the following decorator to catch the event @HostListener('document:ionBackButton', ['$event'])

Override default back button behaviour

I actually cant get any of these to do something working with beta.17. Am i right at assuming this would handle the in the header as well as the android hardware back button ?


I think there might be still some glitch, depends of your use case. There is a try to have one single issue to consolidate everything which has to do with back button ->


That ticket is related to the android back button. i want to overrride and prevent the default behaviour of the ion-back-button in the ion-toolbar. Is there a way to do that ?