[
https://issues.apache.org/jira/browse/CB-11077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15248380#comment-15248380
]
ASF GitHub Bot commented on CB-11077:
-------------------------------------
Github user daserge commented on a diff in the pull request:
https://github.com/apache/cordova-docs/pull/580#discussion_r60286669
--- Diff: www/docs/en/dev/cordova/events/events.md ---
@@ -323,6 +323,16 @@ function onBackKeyDown() {
}
```
+### Windows Quirks
+
+Throw an error in a `backbutton` callback to force the default behavior:
+
+```javascript
+document.addEventListener('backbutton', function (evt) {
+ throw "Exit"; // This will suspend the app
--- End diff --
I believe the goal of the overriding is to implement a custom navigation
logic as back button closes the app by default on Windows as opposed to its
purpose - go back or close if there is no navigational history.
So the only way to control this now is an option to throw an exception in
handler so that the app close will happen.
> backbutton does not minimize app
> --------------------------------
>
> Key: CB-11077
> URL: https://issues.apache.org/jira/browse/CB-11077
> Project: Apache Cordova
> Issue Type: Bug
> Components: Windows
> Affects Versions: 4.3.0, 4.3.2
> Reporter: Beat
> Labels: cordova, docs, triaged, universal, window,
> windows-phone, windows-phone-81, windows-universal
>
> I was always wondering why backbutton handling was not well supported on
> windows-phone platform until [email protected] was released with backbutton
> support [CB-8481|https://issues.apache.org/jira/browse/CB-8481].
> But currently this fix became a real problem for me since I tried to release
> a new version of my application to the windows store. My application was not
> approved by ms team, because it was not suspended when there is no history.
> So I had to downgrade to [email protected] to get an approved application...
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]