[
https://issues.apache.org/jira/browse/CB-12352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Igor updated CB-12352:
----------------------
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):
{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}
was:
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}
> 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
> Labels: bug
>
> 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):
> {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: [email protected]
For additional commands, e-mail: [email protected]