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

TiAPI: Add state querying methods to UI components

    Details

    • Type: Story
    • Status: In Review
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Release 9.1.0
    • Component/s: TiAPI
    • Labels:
    • Story Points:
      13
    • Sprint:
      2020 Sprint 1, 2020 Sprint 2, 2020 Sprint 3

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cwilliams Christopher Williams
                Reporter:
                cwilliams Christopher Williams
                Reviewer:
                Vijay Singh
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

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

                    Git Source Code