New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load file:// pages #1578

Closed
jblas opened this Issue May 6, 2011 · 12 comments

Comments

Projects
None yet
1 participant
@jblas
Contributor

jblas commented May 6, 2011

When a JQM document is loaded via file:// protocol, links to local files fail to load.

This issue was reported initially as a PhoneGap problem by @plethllc in Issue 991, but it seems that *ANY * non-Mozilla browser also exhibits the problem even on the desktop.

Something changed recently because this used to work.

@ghost ghost assigned jblas May 6, 2011

@jblas

This comment has been minimized.

Show comment
Hide comment
@jblas

jblas May 6, 2011

Contributor

I just checked in a fix for the file:// problem:

e775f5e

Contributor

jblas commented May 6, 2011

I just checked in a fix for the file:// problem:

e775f5e

@jblas

This comment has been minimized.

Show comment
Hide comment
@jblas

jblas May 6, 2011

Contributor

I just verified that this fixes things on desktop and in phonegap.

Contributor

jblas commented May 6, 2011

I just verified that this fixes things on desktop and in phonegap.

@jblas jblas closed this May 6, 2011

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost May 6, 2011

I just pulled the update down, did a new make, and i'm still seeing the same infinite spinner. This thing is killing me.

ghost commented May 6, 2011

I just pulled the update down, did a new make, and i'm still seeing the same infinite spinner. This thing is killing me.

@jblas

This comment has been minimized.

Show comment
Hide comment
@jblas

jblas May 6, 2011

Contributor

What do you mean "pulled the update"?

Contributor

jblas commented May 6, 2011

What do you mean "pulled the update"?

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost May 6, 2011

I did a pull from github on my checkout of jqm, got the commit you made, and did a make to rebuild the jqm js file.

Am I using a term incorrectly? (I'm not all that experienced with git lingo)

ghost commented May 6, 2011

I did a pull from github on my checkout of jqm, got the commit you made, and did a make to rebuild the jqm js file.

Am I using a term incorrectly? (I'm not all that experienced with git lingo)

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost May 6, 2011

The JQM js file in xcode now shows this section of code, which is your change right?

//set the generated BASE element's href attribute to a new page's base path
reset: function() {
base.element.attr( "href", initialPath );
}

ghost commented May 6, 2011

The JQM js file in xcode now shows this section of code, which is your change right?

//set the generated BASE element's href attribute to a new page's base path
reset: function() {
base.element.attr( "href", initialPath );
}

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost May 6, 2011

I stuck my example in a public repo if it would help to see any of it.

git@github.com:plethllc/jqm_bug.git

ghost commented May 6, 2011

I stuck my example in a public repo if it would help to see any of it.

git@github.com:plethllc/jqm_bug.git

@jblas

This comment has been minimized.

Show comment
Hide comment
@jblas

jblas May 6, 2011

Contributor

@plethllc

I just tested phonegap in the Mac iPhone emulator and it works just fine.

Can you test by using remote URLs? I'm using the following in my packaged app:

<link rel="stylesheet"  href="http://jquerymobile.com/test/themes/default/" />
<script type="text/javascript" src="http://jquerymobile.com/test/js/jquery.js"></script>
<script type="text/javascript" src="http://jquerymobile.com/test/js/"></script>
  • Kin
Contributor

jblas commented May 6, 2011

@plethllc

I just tested phonegap in the Mac iPhone emulator and it works just fine.

Can you test by using remote URLs? I'm using the following in my packaged app:

<link rel="stylesheet"  href="http://jquerymobile.com/test/themes/default/" />
<script type="text/javascript" src="http://jquerymobile.com/test/js/jquery.js"></script>
<script type="text/javascript" src="http://jquerymobile.com/test/js/"></script>
  • Kin
@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost May 6, 2011

@jblas

Just tested, still getting the spinner.

See the repo I made above, but basically, two pages. (the comment thing with github seems to be eating part of the div on the second page example, but you can look at the repo if it isn't clear)

index.html

<div data-role="page" data-theme="b" id="jqm-home"> 
    <div  data-role="header"  data-theme="a"> 
        <h1>Page Title</h1> 
    </div> 

    <div data-role="content"> 
        <img src="tux.png" />
        <ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b"> 
            <li data-role="list-divider">Search By</li> 
            <li><a href="#jqm-search">Username</a></li> 
            <li><a href="user.html">Email Address</a></li> 
        </ul>    
    </div> 
</div>

and user.html

ghost commented May 6, 2011

@jblas

Just tested, still getting the spinner.

See the repo I made above, but basically, two pages. (the comment thing with github seems to be eating part of the div on the second page example, but you can look at the repo if it isn't clear)

index.html

<div data-role="page" data-theme="b" id="jqm-home"> 
    <div  data-role="header"  data-theme="a"> 
        <h1>Page Title</h1> 
    </div> 

    <div data-role="content"> 
        <img src="tux.png" />
        <ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b"> 
            <li data-role="list-divider">Search By</li> 
            <li><a href="#jqm-search">Username</a></li> 
            <li><a href="user.html">Email Address</a></li> 
        </ul>    
    </div> 
</div>

and user.html

@jblas

This comment has been minimized.

Show comment
Hide comment
@jblas

jblas May 6, 2011

Contributor

So the problem seems to be the data-ajax="false" on your form in the page you are trying to load. I'm not exactly sure why that would affect the page currently loading, but I'm looking into it.

If you remove that attribute temporarily, you will see that the page switches just fine.

Contributor

jblas commented May 6, 2011

So the problem seems to be the data-ajax="false" on your form in the page you are trying to load. I'm not exactly sure why that would affect the page currently loading, but I'm looking into it.

If you remove that attribute temporarily, you will see that the page switches just fine.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost May 6, 2011

I can confirm this, although I don't understand it.

ghost commented May 6, 2011

I can confirm this, although I don't understand it.

@jblas

This comment has been minimized.

Show comment
Hide comment
@jblas

jblas May 6, 2011

Contributor

@plethllc

I just filed issue 1580:

#1580

Please move any follow up discussions there. The original issue reported in 1578 is fixed.

Contributor

jblas commented May 6, 2011

@plethllc

I just filed issue 1580:

#1580

Please move any follow up discussions there. The original issue reported in 1578 is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment