3
Is there any way to detect when the physical button comes back from smartphone is clicked?
I need it to close one modal.
I thought there might be a matching number like on the keyboard and use the event.which
to detect, but not found.
3
Is there any way to detect when the physical button comes back from smartphone is clicked?
I need it to close one modal.
I thought there might be a matching number like on the keyboard and use the event.which
to detect, but not found.
0
What you can do is use the history API (https://developer.mozilla.org/en-US/docs/Web/API/History_API). When you open the modal would be like entering another page, then the back button of android and also the browser will be able to return to the previous state when triggered. You don’t need to know the button code or depend on its existence, since the browser also has a.
Browser other questions tagged javascript jquery mobile
You are not signed in. Login or sign up in order to post.
I think this is very relative, because iPhones have no back button, this is more crazy.
– Sam
Yes, but on android would have some way to do this?
– Diego Vieira