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

iOS: Window close event not fired on NavigationWindow with ListView

    Details

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

      SDK 5.0.2.GA
      Mac OS Yosemite
      iOS 9.0 iPhone simulator
      Xcode 7

    • Story Points:
      5
    • Sprint:
      2016 Sprint 06 SDK

      Description

      When opening a new window with a ListView from within a NavigationWindow, the close event of this window sometimes get fired and sometimes won't.

      Example:

      win1.xml

      <Alloy>
          <NavigationWindow id="navwin" platform="ios">
              <Window id="win1" title="Red Window" backgroundColor="red">
                  <Button id="button" onClick="openBlueWindow">Open Blue Window</Button>
              </Window>
          </NavigationWindow>
      </Alloy>
      

      win1.js

      function openBlueWindow(e) {
          var win2 = Alloy.createController('win2').getView();
          win2.addEventListener("close", function() {
            console.log("CLOSED!");
          });
          $.navwin.openWindow(win2);
      }
      

      $.navwin.open();

      win2.xml

      <Alloy>
          <Window id="win2" title="Blue Window" backgroundColor="blue">
            <ListView id="list">
                <ListSection>
                    <ListItem title="List item 1"></ListItem>
                    <ListItem title="List item 2"></ListItem>
                    <ListItem title="List item 3"></ListItem>
                </ListSection>
            </ListView>
          </Window>
      </Alloy>
      

      win2.js

      function closeWindow(){
          $.win2.close();
      }
      

      When you close window 2 the expected behaviour is to see "CLOSED!" in the console, but it only randomly shows.

        Attachments

          Activity

            People

            • Assignee:
              penrique Pedro Enrique (Inactive)
              Reporter:
              michielve Michiel van Eerd
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code