cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From daserge <...@git.apache.org>
Subject [GitHub] cordova-docs pull request: CB-11077 backbutton does not minimize a...
Date Tue, 19 Apr 2016 18:35:36 GMT
Github user daserge commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/580#discussion_r60286296
  
    --- 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
    +}, false);
    +```
    +
    --- End diff --
    
    I don't see another way to handle this situation taking into account the cordova-js implementation.
    Theoretically we could use a callback return value from `cordova.fireDocumentEvent('backbutton',
evt, true);` but it only allows to capture an exception but not a value.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message