cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-12352) HTML5 full screen video breaks backbutton listener
Date Sun, 15 Jan 2017 22:06:26 GMT

     [ 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: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message