Close popup when you click the back button

-1

Is there any way to detect the "back" click? More necessarily from mobile devices (Android is enough).

I would like, in my web app, the back button to call certain functions, in this case closing popups. Do you have any ideas?

    
asked by anonymous 11.12.2018 / 09:56

1 answer

0

You can try to use the function:

document.addEventListener("backbutton", onBack, false)
function onBack(){ /* faz algo ao clicar no botão voltar */ }
    
11.12.2018 / 11:00