You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "jcesarmobile (JIRA)" <ji...@apache.org> on 2018/08/08 11:42:00 UTC
[jira] [Commented] (CB-14257) Default backbutton executes even
after overriding by adding event listener on deviceready
[ https://issues.apache.org/jira/browse/CB-14257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16573075#comment-16573075 ]
jcesarmobile commented on CB-14257:
-----------------------------------
have you tried adding event.preventDefault(); to the backbutton event?
> Default backbutton executes even after overriding by adding event listener on deviceready
> -----------------------------------------------------------------------------------------
>
> Key: CB-14257
> URL: https://issues.apache.org/jira/browse/CB-14257
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-android
> Affects Versions: cordova-android-7.0.0
> Environment: Cordova - 7.0.0
> Cordova-android - 7.0.0
> Angular - 5
> OnsenUI(CSS) - 2
> Reporter: Dilip
> Priority: Critical
>
> I am working on Cordova, Angular5 and OnsenUI(CSS Only).
> 1. I added backbutton event listener in deviceready.
> 2. When i navigate to 3 pages and press backbutton, the backbutton callback triggered but default backbutton executes after that and webview got terminated.
> **Now when i add backbutton event listener it should override with my call back, but it executes both, Can some one help me out**
> Note: Before integrated OnsenUI CSS, callback of backbutton working properly which means only Cordova with Angular5
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org