Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#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:


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:

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 11 years ago by bill

Cc: ykami added
Owner: set to Rawld Gill

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

comment:2 Changed 11 years ago by bill

Milestone: tbd1.7

comment:3 Changed 11 years ago by mdrob

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 11 years ago by bill

Our test files like in seem to work, they all have that <meta> tag and dojo.require() calls.

comment:5 Changed 11 years ago by Rawld Gill

Status: newassigned

comment:6 Changed 11 years ago by Rawld Gill

Resolution: worksforme
Status: assignedclosed

No further report after bill says can not duplicate; closing for now.

comment:7 Changed 11 years ago by bill

Component: GeneralLoader
Note: See TracTickets for help on using tickets.