Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Local images with full URLs broken in Firefox 3.6 #1551

Closed
@pauln

Description

@pauln

If an image's src is set to a full URL, but is not from an external site, it gets rewritten incorrectly in Firefox 3.6 (actually any browser for which $.support.dynamicBaseTag is false, but that only seems to be Firefox < 4) if it's from a higher-level folder and the page is loaded via AJAX. I've built a quick example based off the list test page (http://jquerymobile.com/test/docs/lists/lists-icons.html):
Broken (AJAX loaded): http://next.gen.nz/bugs/jqm-images/#/bugs/jqm-images/icons/index.html
Working (standard HTTP load): http://next.gen.nz/bugs/jqm-images/icons/index.html

This example uses the JQuery Mobile code directly from the http://jquerymobile.com/test/ so it should be able to be used as a final test if/when a fix makes it that far.

The problem is the following replacement, on line 618 of jquery.mobile.navigation.js:
//if full path exists and is same, chop it - helps IE out
thisUrl = thisUrl.replace( location.protocol + "//" + location.host + location.pathname, "" );

The comment suggests that it is for IE's benefit, but IE doesn't run this code as $.support.dynamicBaseTag is true in IE (7+; IE6 doesn't appear to be supported by JQuery Mobile at all). Removing this line does not appear to have any negative consequences.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions