#12521 closed defect (worksforme)
dojo.require fails in standalone mode on iPhone
Reported by: | mdrob | Owned by: | Rawld Gill |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | Loader | Version: | 1.4.3 |
Keywords: | ajax dojo.require require offline standalone | Cc: | ykami |
Blocked By: | Blocking: |
Description
running an application with
<meta name='apple-mobile-web-app-capable' content='yes'/>
This makes an application run full-screen on an iPhone. In this mode, a standard ajax request does not return a proper status even if the return is successful. More information on this can be found here: http://www.javascriptkit.com/jsref/ajax.shtml
In order to get around this, the following line needs to be added to dojo._isDocumentOK:
if (navigator.standalone === true && http.readyState == 4) return true;
this may not be the most elegant solution and something more robust can probably be written, but so far this has worked for me.
Without the above fix, the very first dojo.require fails and the project fails to load properly.
I tested locally with 1.4.3 but I see the same oversight in 1.6
Change History (7)
comment:1 Changed 10 years ago by
Cc: | ykami added |
---|---|
Owner: | set to Rawld Gill |
comment:2 Changed 10 years ago by
Milestone: | tbd → 1.7 |
---|
comment:3 Changed 10 years ago by
for me, it fails on the very first dojo.require so it certainly seems this way. I dont' know how many people write full-screen iphone applications in dojo to test this theory
comment:4 Changed 10 years ago by
Our test files like in http://download.dojotoolkit.org/release-1.6.0/dojo-release-1.6.0/dojox/mobile/tests/ seem to work, they all have that <meta> tag and dojo.require() calls.
comment:5 Changed 10 years ago by
Status: | new → assigned |
---|
comment:6 Changed 10 years ago by
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
No further report after bill says can not duplicate; closing for now.
comment:7 Changed 10 years ago by
Component: | General → Loader |
---|
Hard to believe it just doesn't work at all, do existing users always include all of their source code into a single build layer (dojo.js)?
Anyway, I think this will be avoided when Rawld checks in the new AMD loader, and all code is converted to AMD format (specifically, the code in dojox.mobile).