2

I am having a big problem with the back button of the web browser when executing my pwa in ionic, when doing 4 rollbacks after a site navigation, the application freezes and returns the browser error STATUS_BREAKPOINT. I would appreciate if you could tell me or help me disable this or control the event.

Error

2
  • Hello Friend, your Post has a problem and is written in a different Language than the expected on the Site; I recommend that you translate it into Spanish.
    – user46896
    el 10 nov. 2021 a las 20:31
  • Hola amigo, Bienvenido al Sitio, He verificado tu post y te comento lo siguiente:, Puedes leer este Articulo Cómo preguntar, Me parece que a tu POST le falta un Codigo o Ejemplo Minimo Reproducible, Puedes leer este Articulo ejemplo mínimo verificable, He visto que has agregado Imágenes, es preferible que tus ejemplos sean en texto y facilites el uso del mismo, También es importante que sepas que preguntas son mal vistas centro de ayuda.
    – user46896
    el 10 nov. 2021 a las 20:31

1 respuesta 1

2

This may help you. Prevents going back in the browser.

constructor() { 
    this.NoBackNavigator()
}
NoBackNavigator() {
    history.pushState(null, document.title, location.href);
    window.addEventListener('popstate', function (event)
    {
      history.pushState(null, document.title, location.href);
    });
}
1
  • Gracias por la respuesta y ser cortes con un usuario nuevo. Saludos el 11 nov. 2021 a las 15:10

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.