-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Local images with full URLs broken in Firefox 3.6 #1551
Comments
…fox 3.6) Remove a string replacement which claims to be for IE's benefit but which doesn't even run in IE - only runs in Firefox < 4, where it breaks some images.
… broken in Firefox 3.6) Change replacement URL to use path.clean( path.origin ) instead of path.get( fileUrl ) so that generated URLs are not broken (basing them off fileUrl breaks them if the page being viewed is in a different directory to path.origin).
…erly. Includes a tweak to path.get() to append a trailing slash if not present.
Is this still an open issue or did we hit this as part of the nab re-write? |
It doesn't seem to have been fixed - the test case in the initial issue description is still full of broken images. I'm rather behind with jquery-mobile stuff, as I've had other priorities lately, so I'll have to grab a nice clean clone and see about reimplementing the fix cleanly. |
…ame so that we don't remove one prefix but add a different one
@MaxThrax - is this issue still happening in the latest build? |
Hi, can someone test this in IE6 - latest? Thanks, Anne |
Ok, just tested with FF 3.5.2 on Solaris and this seems fixed (i.e. no broken images on provided test page http://next.gen.nz/bugs/jqm-images/#/bugs/jqm-images/icons/index.html ). browser details: Mozilla/5.0 (X11; U; SunOS sun4v; en-US; rv:1.9.1.2) Gecko/20090803 Firefox/3.5.2 |
Agreed :-) |
Please reopen bug, this is still not solved. I just tested the two links from pauln in Firefox 17.0.1 and Safari 6.0.2 on Mac OS and the bug is still there. |
I fixed the issue in my case. I just wanted to remove the part of the url like Domain etc. with the following script: But when I use this snippet, the URL in the browser window is changing, the anchor gets removed (like in the docs: http://jquerymobile.com/demos/1.2.0/). Before I had this, the anchor was not removed which I think caused the error. So I wanted to solve the problem afterwards by correcting the src urls but I corrected it another way (anchor gets removed right). I don’t know why, but it works. The JS command does not do anything with the browsers url, is this in conjunction with jqm? |
In my previous post, there was an error in my script, that was the reason of that behaviour it worked and the anchor got removed. Here my running script: $('div:jqmData(role="page")').live('pagebeforeshow',function(){ This makes my absolute URLs from the CMS relative and it works. But the problem itself in jQuery mobile should be checked itself. I think it is concerned to the anchor in the browser url. Why does the anchor get removed at the docs (http://jquerymobile.com/demos/1.2.0/) and in my case not? Which behaviour is right? |
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.
The text was updated successfully, but these errors were encountered: