"orientationchange" event does not fire in Chrome Mobile
REQUIRED INFORMATION
Framework version tested:Browser versions tested against:- Android 4.0.4 Chrome 18.0.1025308
Description:- "orientationchange" event does not fire in Chrome Mobile
Steps to reproduce the problem:- Run the test case below
- Change the orientation and observe that the alert is not shown
Test Case
Code:
Ext.application({
name: 'ChromeOrientationTest',
launch: function() {
Ext.Viewport.on({
orientationchange: function() {
alert(Ext.Viewport.getOrientation());
}
});
}
});
Debugging Already Done
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
Code:
if (!Ext.os.is.Android) {
to
Code:
if (!Ext.os.is.Android || Ext.browser.name == 'ChromeMobile') {