View Full Version : [CLOSED] Blank canvas with phonegap 1.2

25 Nov 2011, 5:55 PM
Ok.. After thorough testing ST2PR2 does not work with phonegap 1.2 and XCode 4.2.1 - at least the card layout does not. It draws the DOM correctly but the final result is a totally blank screen.

I have had numerous positioning and visibility issues with the card layout due to some bugs so perhaps this is related as well.

My index.html:

<!DOCTYPE html>

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;"/>
<meta charset="utf-8"/>

<link rel="stylesheet" href="touch/resources/css/sencha-touch.css" type="text/css"/>
<link rel="stylesheet" href="resources/css/app.css" type="text/css"/>
<script type="text/javascript" src="touch/sencha-touch-all.js"></script>
<script type="text/javascript" charset="utf-8" src="phonegap-1.2.0.js"></script>
<script type="text/javascript" src="app/app.js"></script>
<script src="http://localhost:8081/target/target-script-min.js#anonymous"></script>
<script type="text/javascript">

function onBodyLoad()
//for browser testing

//for phonegap
document.addEventListener("deviceready", onDeviceReady(), false);
function onDeviceReady() {
name: 'Sencha',
main: null,
init: function() {
'#switch': {
tap: this.onButton
}, null, this)
launch: function() {
var a = this;
a.main = Ext.create("Ext.Panel", {
fullscreen: true,
layout: 'card',
xtype: 'mypanel',
items: [
title: 'Home',
iconCls: 'home',
cls: 'home',
html: 'home page',
title: 'Contact',
iconCls: 'user',
xtype: 'formpanel',
url: 'contact.php',
layout: 'vbox',
items: [
xtype: 'fieldset',
title: 'Contact Us',
instructions: '(email address is optional)',
items: [
xtype: 'textfield',
label: 'Name'
xtype: 'emailfield',
label: 'Email'
xtype: 'textareafield',
label: 'Message'
xtype: 'button',
itemId: 'switch',
id: 'switch',
text: 'Send',
ui: 'confirm',

onButton: function() {

<body onload="onBodyLoad()"></body>

27 Nov 2011, 1:18 PM
Note that I tested the css location so I know the css is loading correctly

Jamie Avins
28 Nov 2011, 10:05 AM
Dupe: http://www.sencha.com/forum/showthread.php?154072-Blank-Canvas-on-iPhone-with-PhoneGap-1.1&highlight=phonegap

Lets keep it in one thread please.