You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2013/10/06 07:49:42 UTC

[jira] [Commented] (CB-3621) Overriding Back Button behavior can lead to inconsistent state

    [ https://issues.apache.org/jira/browse/CB-3621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13787499#comment-13787499 ] 

ASF subversion and git services commented on CB-3621:
-----------------------------------------------------

Commit be911f456c6b504eeb481552788d52105a057cab in branch refs/heads/master from [~viras]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-wp8.git;h=be911f4 ]

[CB-3621] backbutton events can now throw an exception to let the native side know that it should exit the app


> Overriding Back Button behavior can lead to inconsistent state 
> ---------------------------------------------------------------
>
>                 Key: CB-3621
>                 URL: https://issues.apache.org/jira/browse/CB-3621
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: WP7, WP8
>    Affects Versions: 2.8.0
>            Reporter: Jesse MacFadyen
>            Assignee: Jesse MacFadyen
>             Fix For: 2.9.0
>
>
> The current implementation does the following:
> - if the app has overridden the back button, by using document.addEventListener, then the backbutton event is passed to the page, and discarded.
> - else, the library will call window.history.back and if the page changes, discard the event.
> In all other cases the event will be passed to the OS and the app will exit.
> It is possible that an app is overriding the backbutton, but still needs the ability to exit at some point ( in response to a backbutton event ).
> If the page history has changed, then the framework would swallow the event, so it is impossible to get this behavior.
> We need to either add a programmatic way to exit the app in response to a back-button press, or find a way to signal the framework that even though I am overriding the backbutton, the app should still pass the event on to the OS.



--
This message was sent by Atlassian JIRA
(v6.1#6144)