You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Igor (JIRA)" <ji...@apache.org> on 2017/01/15 22:05:26 UTC
[jira] [Created] (CB-12352) HTML5 full screen video breaks
backbutton listener
Igor created CB-12352:
-------------------------
Summary: HTML5 full screen video breaks backbutton listener
Key: CB-12352
URL: https://issues.apache.org/jira/browse/CB-12352
Project: Apache Cordova
Issue Type: Bug
Components: Android, CordovaJS
Affects Versions: 6.0.0
Reporter: Igor
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 example:
{code:title=cordova|borderStyle=solid}
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);
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org