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

iOS: the openWindow() method of NavigationWindow does not work when called from base window open event

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 8.0.0
    • Fix Version/s: Release 8.1.0
    • Component/s: iOS
    • Labels:
      None
    • Environment:

      Mac OS 10.14.3
      Ti SDK: 8.0.0.v20190219113758
      Appc CLI: 7.0.10-master.15
      Node: 8.12.0
      JDK: 9.0.4
      Studio: 5.1.2.201812191831
      XCode: 10.1

      Description

      The openWindow() method of Ti.UI.NavigationWindow does not work when it is called from the open event of the base window.
      The openWindow method gets called successfully after the window layout is complete.

      The openWindow() method for TI.UI.iOS.NavigationWindow (which is deprecated in 8.0 in favour of Ti.UI.NavigationWindow) also does not work from window open event in 8.0. But it works fine in 7.5.0.GA SDK

      Steps to Reproduce:
      1. Create a new mobile project. Add the code as shown below to the app.js
      2. Launch the app on iOS device or simulator
      3. Change the event from open to postlayout for win1.addEventListener
      4. Again build and launch the app

      Actual Result:
      Step 2:The blue window does not open. It continues to show only red window
      Step4: The blue window is shown with navigation bar showing the option to navigate back to the red window

      Expected Result:
      On Step 2: The blue window should be shown with navigation bar showing the option to navigate back to the red window

      Titanium.UI.setBackgroundColor('#000');
      var win1 = Titanium.UI.createWindow({
          backgroundColor:"red",
          title:"Red Window"
      });
       
      var win2 = Titanium.UI.createWindow({
          backgroundColor:"blue",
          title:"Blue Window"
      });
       
      win2.addEventListener('open', function(e) {
          alert('win2');
      });
      win1.addEventListener('open', function(e) {
          alert('win1');
              nav.openWindow(win2,{animated:true});
      });
        
      var nav = Titanium.UI.createNavigationWindow({
         window: win1
      });
      nav.open();
      
      

        Attachments

          Activity

            People

            • Assignee:
              vijaysingh Vijay Singh
              Reporter:
              ssekhri Satyam Sekhri
              Reviewer:
              Jan Vennemann
              Tester:
              Samir Mohammed
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code