Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8027] iOS: Window open event is fired three times, when using with navigation group.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-04-19T14:48:12.000+0000
Affected Version/sRelease 2.0.0, Release 1.8.1, Release 1.8.2
Fix Version/sRelease 2.0.0, Sprint 2012-06
ComponentsiOS
Labelsmodule_window, qe-testadded
ReporterDevang Gandhi
AssigneeVishal Duggal
Created2012-03-14T21:58:36.000+0000
Updated2013-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});

Comments

  1. Vishal Duggal 2012-03-16

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/1714
  2. Michael Pettiford 2012-03-19

    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
  3. Wilson Luu 2012-04-19

    Reopening to update labels.
  4. Sabil Rahim 2012-07-26

JSON Source