Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12789] iOS: orientationchange event sometimes fires on app startup

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.0.2
Fix Version/sn/a
ComponentsiOS
LabelsGesture, bug, event, ios, orientation
ReporterMitchell Amihod
AssigneeUnknown
Created2013-02-15T22:26:42.000+0000
Updated2018-02-28T20:03:28.000+0000

Description

*Actual behavior* The orientationchange event sometimes fires on app startup. eg: I run app in simulator 5 times (via titanium build), it fires 3 of those times. *Expected behavior* It shouldn't fire at all on app startup. It should only fire on an orientationchange event. *Test case*
Ti.Gesture.addEventListener('orientationchange', function(e) {
    if(Ti.Gesture.isLandscape()) {
        Ti.API.warn('orientationchange ---> landscape');
    } else {
        Ti.API.warn('orientationchange ---> portrait');
    }
});

Comments

  1. Arthur Evans 2013-02-19

    It seems like there are a number of issues reported related to orientationchange events. (Try searching for "orientationchange" in the summary.) If we can't fix the API as it exists, because we're just reporting the raw accelerometer events, can we prioritize Blain's new proposed API for UI orientation events as described in TIMOB-10788?

JSON Source