05-11-2011 11:31 PM
My webworks app simply isn't rendering even though I can tell the at least index.html is loading. I'm testing by creating a config.xml that points to my server. Now, when I load this webapp in the on-simulator browser, it looks and behaves fine. However, now when I load that webapp via my webworks app, which points to the same location as my browser just did, it basically doesn't render (I get a 5-ish pixel blue line across the top).
So, I guess I have two questions:
- Under what circumstances would a webworks app render differently than the browser?
- Is there anyway to view console.log output w/o resorting to Phonegap, or any way to see error messages?
This is an unsigned app that doesn't use any special BB API
Other external sites, such as twitter.com, or simpler flavors of my own web app, work fine, too.
Running latest Java and Simulator 220.127.116.11 (9800-ATT)
Related (?) Question from a few years ago:
Solved! Go to Solution.
05-12-2011 07:18 AM
Do you have any CSS that was taking into account the browser chrome (top toolbar) that could be causing the CSS difference?
Also, in a WebWorks app the web view grows to the size of the content. So if the page is shorter than the size of the screen, the background color of the application will be shown at the bottom of the web content.
This can be worked around by setting the viewport or by running the following onload
document.body.style.height = screen.height + 'px';
05-12-2011 08:27 PM
05-12-2011 10:07 PM
Ok - I figure it out, though it doesn't make sense.
I had accidently put this in redundant viewport meta data, which didn't seem to be a problem in the browser, but hosed the widget.
<!-- no scroll on blackberry --> <meta name="viewport" id="viewport" content="width=360,height=480,initial-scale=1.0,us
Second one (evil):
<!-- No Zoom --> <meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
This second entry totally hosed the display. Removing it seems to have solved the problem.
Just for the record, this second entry didn't seem to bother the browser - things displayed normally.