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

TiAPI: Add state querying methods to UI components


    • Type: Story
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 9.1.0
    • Component/s: TiAPI
    • Labels:
    • Story Points:
    • Sprint:
      2020 Sprint 1, 2020 Sprint 2, 2020 Sprint 3, 2020 Sprint 9, 2020 Sprint 10, 2020 Sprint 11, 2020 Sprint 12, 2020 Sprint 13, 2020 Sprint 14


      This is a glaring issue when we look at our test suite and see the common before hooks we've written to clean up open windows/etc.

      We have no means of telling if a Window is closed or open. So instead we fire off a 3-second setTimeout fallback to handle the "isClosed" case, and then hang an event listener for the close event and try to close the window. So in the case where the test never opened the window (or already closed it), we basically do nothing for 3 seconds and assume since the close event never fired that it must have been closed.

      We have Ti.UI.View.visible which should tell us if a view is hidden or visible.

      Proposed APIs:
      Ti.UI.Window.closed - boolean, true or false

      Ti.UI.View.focused - boolean, true or false


          Issue Links



              • Assignee:
                cwilliams Christopher Williams
                cwilliams Christopher Williams
                Vijay Singh
              • Watchers:
                4 Start watching this issue


                • Created:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration