Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
6.0.0
-
None
Description
I have application built with latest Phonegap CLI. I'm using html5 video tag to play video. After exiting from fullscreen and pressing back button, application closes instead of going to previous screen.
Code I'm using (even alert wont show):
cordova
document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { document.addEventListener("backbutton", function (e) { alert('backbutton'); if (mainView.activePage.name=='index'){ navigator.notification.confirm("Are you sure want to exit from App?", onConfirmExit, "Confirmation", "Yes,No"); function onConfirmExit(button) { if(button==2){ //If User select a No, then return back; return; }else{ navigator.app.exitApp(); // If user select a Yes, quit from the app. } } } else{ mainView.router.back(); } }, false); }