Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-23701

iOS: close() is applied to multiple window views with Storyboard enabled

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 5.4.0
    • Fix Version/s: Release 5.4.0
    • Component/s: iOS
    • Environment:

      iPhone 6S (9.3.2) Device & iPhone 6 Plus (8.3) Device
      Mac OSX El Capitan 10.11.5
      Ti SDK: 5.4.0.v20160727143921
      Appc Studio: 4.7.0.201607111053
      Appc NPM: 4.2.7
      App CLI: 5.4.0-34
      Xcode 7.3
      Node v4.4.7

    • Story Points:
      3
    • Sprint:
      2016 Sprint 15 SDK

      Description

      This is a regression from 5.3.1.GA

      It was found that when opening a second window within an app, calling the close() method will actually close both windows. This only occurs when <enable-launch-screen-storyboard> is set to TRUE, which is the default configuration.

      TEST CODE:

      Ti.UI.backgroundColor = "Black";
       
      var win = Ti.UI.createWindow({backgroundColor:'blue'});
       
      var open = Ti.UI.createButton({
      	title: 'Open Window'	
      });
       
      var close = Ti.UI.createButton({
      	title: 'Close Window'
      });
       
      open.addEventListener('click', function(){
      	var win2 = Ti.UI.createWindow({backgroundColor:'green'});
      	win2.add(close);
      	close.addEventListener('click', function(){
      		win2.close();
      	});
      	win2.open();
      });
       
      win.add(open);
      win.open();
      

      Background: Black
      Window 1: Blue
      Window 2: Green

      Steps to Reproduce

      1. Create a new Classic Mobile Project.
      2. Copy above test code into app.js file.
      3. Ensure that <enable-launch-screen-storyboard> is set to TRUE in the tiapp.xml.
      4. Run App to device / sim.
      5. Click on "Open Window" button, this will open a second green window.
      6. Click on "Close Window" button, this will close the second green window.

      Actual Result

      Both win1 & win2 are closed, revealing the black background.

      Expected Result

      Only win2 should be closed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hknoechel Hans Knöchel
                Reporter:
                htbryant Harry Bryant
                Reviewer:
                Chee Kiat Ng (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-9960
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration