Success! Looks like we've fixed this one. According to our records the fix was applied for
a recent build.
Ext.browser.is.WebView should be false for Ext.os.is.Desktop
Ext version tested:
Browser versions tested against:
- Safari 5.1.5
- PhoneGap 1.5.0
DOCTYPE tested against:
- If you add the PhoneGap script tag to your index.html and require Ext.device.Device, you'll get the following error:
. This is because the Ext.browser.is.WebView flag only checks for the existence of window.PhoneGap (or Cordova), while it should also check if we're in fact on a phone. Because it doesn't, the Ext.device.* classes construct the PhoneGap subclasses. And since Ext.device.Device.PhoneGap tries to read device.* upon construction.. it fails.
Steps to reproduce the problem:
- Create a blank app
- Add the PhoneGap/Cordova script and script-tag
- Open the app on your desktop (or try to sencha app build package it).
The result that was expected:
- Use of the Ext.device.*.Simulator classes
The result that occurs instead:
- Use of the Ext.device.*.Phonegap classes
- The described error
Debugging already done:
- Only set the WebView flag if we're on a phone
Additional CSS used:
Thank you for the report.
Sencha - Sencha Touch Dev Team
Fixed for the next release. Thanks!