- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i register the backbutton listener in index page ,it works when i press the back button.but in the second level page,there is no response
for example:
index.js:
document.addEventListener("deviceready", onDeviceReady, false);
// Cordova is loaded and it is now safe to call Cordova methods
//
function onDeviceReady() {
//alert(999);
// Register the event listener
document.addEventListener("backbutton", onBackKeyDown, false);
}
index.html:
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script src="js/index.js"></script>
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you testing this in the Emulator, or with App Preview or Debug?
Dale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm seeing the same issue. It looks like it's not working in Cordova 5.1.1 but is working in 4.1.2. If it works for you to change Cordova versions I would recommend that until there is a fix. To do that go to your projects page, expand "Build settings" then look for "Cordova CLI Version". Click on that circle just to the right of the version number and you should see a drop-down menu with two choices, just switch that to 4.1.2 and see if that works for you. Note, if you're using some third party plugins you may need to make sure they're the appropriate version to work with that Cordova version, as a lot changed between 4 and 5.
Meanwhile I'll do what I can to try to get a fix for Cordova 5. I'll update here when I have more info.
Dale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I testing this with android phone
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page