| GitHub Issue | n/a |
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-11-28T23:53:59.000+0000 |
| Affected Version/s | 2012 Sprint 24, 2012 Sprint 24 API |
| Fix Version/s | Release 3.0.0, Release 3.1.0, 2012 Sprint 24, 2012 Sprint 24 API |
| Components | Android |
| Labels | SupportTeam, module_alertdialog, qe-review, qe-testadded, regression, triage |
| Reporter | Soumya Kanti Kar |
| Assignee | Hieu Pham |
| Created | 2012-11-25T10:59:07.000+0000 |
| Updated | 2013-06-11T21:34:42.000+0000 |
Problem description
The android:back event is not fired anymore in v3.0
Steps to reproduce
Use the following code to reproduce the issue:
var self = Ti.UI.createWindow({
backgroundColor:'#ffffff',
navBarHidden:true,
exitOnClose:true
});
self.addEventListener('android:back', function(e) {
alert('Back button pressed');
});
self.open();
When clicking back, nothing happens. Works fine on 2.1.x
Caused by https://github.com/appcelerator/titanium_mobile/commit/c4acb990669de48d0dd19906b3e3f20c9fa13ffa Reverting activityProxy.hasListeners("android:back") to window.hasListeners("android:back") solves the regression.
PR https://github.com/appcelerator/titanium_mobile/pull/3473
Closing as fixed. Tested on: Titanium Studio, build: 3.0.0.201211301903 Titanium SDK, builds: 3.0.0.v20121130200208; 3.1.0.v20121203181001 Devices: Samsung Galaxy S III (4.0.4)