Github user daserge commented on a diff in the pull request: https://github.com/apache/cordova-docs/pull/580#discussion_r60264056 --- 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 -- The throw value is not used anywhere, it's just being caught in cordova-js and causes the event handler to indicate that the event has not been handled: https://github.com/apache/cordova-windows/blob/master/template/www/cordova.js#L1489
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org