PDA

View Full Version : [CLOSED] Bug: Error message in app.html can't be seen by non webkit browsers.



mysenchaid123
14 Sep 2012, 3:11 PM
Architect generates app.html for a Sencha Touch app:

<script type="text/javascript">
if (!Ext.browser.is.WebKit) {
alert("The current browser is unsupported.\n\nSupported browsers:\n" +

However, the code will never execute in a non-webkit browser (IE8) since it does not recognize the Ext namespace and therefore not display the error message.

aconran
18 Sep 2012, 6:48 AM
This alert will show up as long as you are including the Sencha Touch JavaScript.

Ext.browser.is.WebKit will be created and set to false in IE8.

mysenchaid123
18 Sep 2012, 10:50 AM
IE8 fails for me. Are you able to get the Alert on a Win7/IE8 box?

See attached JS errors.
38769


This alert will show up as long as you are including the Sencha Touch JavaScript.

Ext.browser.is.WebKit will be created and set to false in IE8.

aconran
18 Sep 2012, 11:07 AM
Ah, there is an exception in sencha-touch-all.js that is preventing it from creating the Ext.browser.is object.

mysenchaid123
18 Sep 2012, 12:06 PM
Yeah, I swapped it out with:

<script type="text/javascript">
if (!RegExp(" AppleWebKit/").test(navigator.userAgent)) {
document.write('Only webkit browsers are supported.');
}
</script>