-
11 Oct 2012 6:45 AM #1
"orientationchange" event does not fire in Chrome Mobile
"orientationchange" event does not fire in Chrome Mobile
REQUIRED INFORMATION
Framework version tested:- Touch 2.1.0-rc1
- Android 4.0.4 Chrome 18.0.1025308
- "orientationchange" event does not fire in Chrome Mobile
- Run the test case below
- Change the orientation and observe that the alert is not shown
Debugging Already DoneCode:Ext.application({ name: 'ChromeOrientationTest', launch: function() { Ext.Viewport.on({ orientationchange: function() { alert(Ext.Viewport.getOrientation()); } }); } });
I believe this bug was introduced in RC1 by this item in the changelog: "Chrome Mobile will now use the Default Viewport". For fun, I changed it back to use the Android Viewport and the issue went away. However, I believe the real fix is probably in the Default Viewport with the code below.
Possible Fix
change
src\viewport\Default.js line 168
toCode:if (!Ext.os.is.Android) {
Code:if (!Ext.os.is.Android || Ext.browser.name == 'ChromeMobile') {
-
12 Oct 2012 6:30 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,599
- Vote Rating
- 435
Thanks for the report! I have opened a bug in our bug tracker.
-
16 Oct 2012 8:47 AM #3Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,651
- Vote Rating
- 14
This has been fixed for the next release.
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-3572
in
a recent build.


Reply With Quote