[TIMOB-8027] iOS: Window open event is fired three times, when using with navigation group.
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-04-19T14:48:12.000+0000 |
| Affected Version/s | Release 2.0.0, Release 1.8.1, Release 1.8.2 |
| Fix Version/s | Release 2.0.0, Sprint 2012-06 |
| Components | iOS |
| Labels | module_window, qe-testadded |
| Reporter | Devang Gandhi |
| Assignee | Vishal Duggal |
| Created | 2012-03-14T21:58:36.000+0000 |
| Updated | 2013-12-02T09:14:53.000+0000 |
Description
Actual Behavior: Two windows win1 and win2 are added to create a Navigation group. The app when launched, the open event listener on win1 is fired thrice. Also when you go to new nav window win2, win1 is again fired.
Expected Behavior: Open event on window 1, should be fired only once.
Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow();
var win1 = Titanium.UI.createWindow({
backgroundColor:"red",
title:"Red Window"
});
win1.addEventListener('open', function(e) {
alert('win1');
});
var nav = Titanium.UI.iPhone.createNavigationGroup({
window: win1
});
win.add(nav);
win.open();
var win2 = Titanium.UI.createWindow({
backgroundColor:"blue",
title:"Blue Window"
});
win2.addEventListener('open', function(e) {
alert('win2');
});
nav.open(win2,{animated:true});
Pull pending https://github.com/appcelerator/titanium_mobile/pull/1714
Closing issue Tested with Ti Studio build 2.0.0.201203182248 Ti Mob SDK 2.0.0.v20120319003254 hash r60b6da4c OSX Lion 10.7.3 iPhone 4 OS 5.0.1 Verified that only one open event is being fired
Reopening to update labels.