Back button physical - jquery-mobile

I work on jquery mobile with phonegap
I would like to detect a click on the physical back button to close my popup.
Currently when I click on that button on a mobile support, it returns me to the page visited previously, I think it only uses the history.
If this is not possible in pure js, then maybe just block this physical button.
Thanks

Related

How to return form the web(iOS) back to the app?

I am using an online builder for my app(ApperyDotIo, JQM framework). My application works fine with one exception. I have an in-app link to my website. The link in the iOS app, the link takes me to the page but since the iPhone doesn't have a "back" button I can't go back to the app. Looks like you have to close the app and then reopen it to get back into the app.
I tried to set the link to not open in the same window and vice versa.
Any easy work around?
Links and back buttons in Android apps work fine.
Thank you
You can consider using the inAppBrowser: https://docs.appery.io/docs/cordova-jquerymobile-inappbrowser
It will allow you to open the website in the child window of the application (with the "close" button) or in the native browser, without opening the website as application page.

is it possible to focus trap in modal popup when using talkback or voiceover?

i have page with iframe
in the iframe when i click the button, popup will appear
when talback or voiceover is enabled, is it possible to focus trap only in the popup ?
so is it possible to achieve that i will be not able to move outside of the popup using swipe gesture ?
by outside i mean, than i will be not able to reach address bar or any other part of site or browser.
i found this
https://medium.com/#islam.sayed8/trap-focus-inside-a-modal-aa5230326c1b
but thats not working on mobile
am i right that its not possible as talback/voiceover are system functions ?
thanks

Issue with openning PDF in iOS 11.3 Using PWA

I've used Vuejs and Framework7 in my PWA. I want to open a remote PDF file in my PWA and also it's important to me that users be able to back to my PWA after opening PDF. I did this using :
window.open(pdf_url, "_blank");
And it works fine for iOS > 12 and after opening pdf file there is an "OK" button for closing pdf.
But for example in iOS 11.3 there is no button and user has to use home button to close PWA.
I tried to solve problem using iframe but I can show only first page of the pdf.
Is there any way to fix this issue?
You can resolve this issue by doing some tricks (for any device without back button):
if you use iframe, you can set height manualy with overflow scroll, and I think this will resolve issue (dependence of style or lib dependency, so that may be not work).
you can add back button to your navbar, or Toolbar to let user click on it to back to previous page. (I prefer this solution).
you can render pdf in popup nested of normal html page, and then you can customize popup component by handling back button, or handling close by dropback overlay.
I use second and third point in real project and its work fine...
This is sample close button code used in popup:
'<p>'+ i18nextHelper.i18next.t('Exit From PDF') +'</p>'
Note: You can also customize height page for pdf page only, and add normal button bellow it, or by add absolute positioning button above PDF, but I think if you use second or third point will be best.
Good luck.

Need help to disable back-forward cache on Safari iOS

I need help to disable back-forward cache on Safari iOS. I tried suggestions provided in this and this but it didn't help.
The functionality that I am trying to achieve is on a multi-page form when a user clicks on the back button he should not be allowed to edit the information on the previous form page. For this I have a modal popup blocking the edit when user clicks back and it works fine on desktop browser and on android but doesn't work as expected on iPhone because of back-forward cache on Safari iOS.

How to trigger GoBack() in WinRT XAML 8.1 WebView control with mouse back button?

I have a page in a WinRT XAML 8.1 app that is basically a full-page display made up of a WebView control, in order to display a web page.
For mouse users, it would be handy to be able to use the hardware mouse button that is included on many mice to go back a page in the WebView (not to the previous app page -- to the previous web page).
WinRT 8.1 is nicely programmed out of the box to respond to the hardware mouse back button and go back a page in an app. But when the mouse is hovered over the WebView control, the app does not respond to the hardware mouse back button at all. Move the mouse off the WebView, and pressing the hardware mouseback button moves to the previous app page.
SO the question is how do I detect the mouse back button when the mouse is hovering over the WebView control so I can issue a GoBack() command to the WebView control?
Manipulation events and certain mouse events (like these, it appears) are not forwarded through the WebView. There is no satisfactory workaround.

Resources