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

Ti API: iOS 'focus' event on window is not called after resume

    Details

      Description

      This was filed as a doc bug (see linked issue) with the justification that this was the expected behavior on iOS. However, the Android behavior does not match--blur and focus are fired on the window when the app is paused and restarted.

      Before we address this in docs, I think we need an architectural decision on the correct behavior.

          1. Original Bug Description

      Issue of the customer:
      It seems the focus event does not get called on the active tab window when an app is resumed.

      For example:

      1.I load my app, and the window in tab 1 triggers on the focus event
      2.I then background my app, without leaving this window
      3.I then move the app back to the foreground. Even though the window now has focus, the focus event is not fired.

      Is this by design or an issue? It seems that the focus event should fire as it is receiving focus again.

      Attached sample code to reproduce this issue:
      app.js: http://pastebin.com/1x8KJNXL
      test.js: http://pastebin.com/ShaypcYE

      Summarized reply from platform team:
      This is the expected behavior, it is by design. When you put an app into background, it is using the underlying pause/resume feature of iOS, this causes the 'focus' event not to trigger when you put it back into the foreground.

      Reason why I created this ticket:
      This isn't documented anywhere, at least I was unable to find anything when searching the wiki. It would be nice if this would be documented somewhere and easy to find, for future reference.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vduggal Vishal Duggal (Inactive)
                Reporter:
                aevans Arthur Evans
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration