[TIMOB-12789] iOS: orientationchange event sometimes fires on app startup
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 3.0.2 |
Fix Version/s | n/a |
Components | iOS |
Labels | Gesture, bug, event, ios, orientation |
Reporter | Mitchell Amihod |
Assignee | Unknown |
Created | 2013-02-15T22:26:42.000+0000 |
Updated | 2018-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');
}
});
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?