[
https://issues.apache.org/jira/browse/CB-13111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard Burkhardt closed CB-13111.
----------------------------------
> preventDefault() on backbutton event is ignored
> -----------------------------------------------
>
> Key: CB-13111
> URL: https://issues.apache.org/jira/browse/CB-13111
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-android
> Affects Versions: 7.0.1
> Environment: cordova versin 7.0.1
> Reporter: Richard Burkhardt
> Assignee: Joe Bowser
> Priority: Critical
>
> Cordova provides a backbutton event to react to the hardware back button. I
> have an ionic app that uses a custom navigation model so I need to override
> the default behavior. I tried this:
> {code:java}
> document.addEventListener("backbutton", function(e) {
> console.log("backbutton is fired");
> e.preventDefault();
> }, false);
> {code}
> it outputs the "backbutton is fired" but still navigates the app.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]