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

MobileWeb: Only listen for deviceorientation event if explicitly listening for orientationchange event

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Won't Fix
    • Affects Version/s: Release 2.1.1
    • Fix Version/s: None
    • Component/s: MobileWeb
    • Labels:

      Description

      Ti.Gesture listens to deviceorientation which fires events dozens of times a second with the latest accelerometer information. If it detects a change, then it fires the orientationchange event. However, if we never listen to orientationchange, then we are wasting precious resources calculating orientation change that we don't care about.

      This can be fixed by overriding addEventListener and removeEventListener and doing the deviceorientation event connect/disconnect on an as needed basis. Be sure to only listen once for the deviceorientation event!

        Attachments

          Activity

            People

            • Assignee:
              cbarber Chris Barber
              Reporter:
              cbarber Chris Barber
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration