[AC-4871] androidback event will always bubble
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2017-03-23T13:59:23.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | android, backbutton |
Reporter | Creative |
Assignee | Shak Hossain |
Created | 2017-03-22T15:00:39.000+0000 |
Updated | 2017-03-23T13:59:23.000+0000 |
Description
Testcase:
* Create a Window
* Attach an event listener using:
// Somecontroller.js
$.getView().addEventListener('androidback', function(e) {
e.cancelBubble = true;
return false;
});
* Press the native back-button on Android
Expected: The window should remain open.
Result: The window will close regardless.
Workaround: handling the event *android:back* (which is presumably deprecated?) +does+ seem to prevent the window from closing, as soon as you define it. I'm confused as to why it was deprecated since it seems to work better. Also, no console warning is thrown by still using the deprecated event.
Hello, I can't reproduce the issue as described. I am using the same code
Window stays open in Android 6.0.1. Tested in SDK 6.0.2.GA. Thanks.