Closed Bug 179793 Opened 22 years ago Closed 13 years ago

Image loaded via src="javascript:foo()" fails to load

Categories

(Core :: Graphics: ImageLib, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX
Future

People

(Reporter: bc, Unassigned)

References

()

Details

Attachments

(1 file)

Note that the two images in in the top right of the avon page are not loading in Mozilla. If the source to an img tag is a javascript:function() which sets the src of the img, then Mozilla 1.2/1.0.2 on W2k do not load the image however IE6 and NN4 do. Not sure if this is imagelib or dom0 testcase coming up.
Attached file testcase
FWIW, you can see an additional test case (and comments) here: http://131.215.22.207/admin/moz_img_src_bug.html
You can also see this bug at the following URL: http://kicken.mine.nu:8008/extras/bug179793.php When you use the selector by clicking on image and use the window that opens, it will always work because the image is valid. If however you type in an image name then tab out of the field so that the blur event is fired, if the image name you typed is invalid, the image will become broken. Once it's broken, you cannot change it's src attribute any more. What actually happens, is more like the image is no longer valid. You can change it's src attribute and all, but nothing happens. The image will not change, and the onerror event for it will no longer work. Onclick still works if you click it to get the browser, but that seems like the only thing that will work. OS: RedHat linux 7.3 User-Agent string: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021016
This bug seems to be fixed with the new 1.2.1 release of mozilla. Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130
does not work for me in either 1.2.1 or 20021203 trunk on win2k. -> still borken. ;-)
reassigning
Assignee: pavlov → jdunn
I am looking into this and the more I look the more this test doesn't make sense. On one hand we are setting the src of an <img>, but in setting it, we are "resetting" it. Seems to me to be a race condition. I talked to vidur about it, he didn't think it should work but couldn't point me to anything to imply that it shouldn't. Doron, do you have any thoughts?
Very iteresting though... If I remove the <div> </div> tags from around the <img> this works...
marking future since I won't get to this till after 1.4
Target Milestone: --- → Future
This is happening, now, because the JS code runs before the <img> is in the document (hence can't reference the image object). I suggest WONTFIX here -- there is no reason that the JS should be running after the image is inserted....
Blocks: 248480
These comments may or may not directly relate to this bug, but nonetheless relate to significant problems. These may even be site implementation problems that rely on design quirks in MS JavaScript. Recently J C Penny (www.jcpenny.com) redesigned the company web site. It no longer works under Mozilla (until recently I used the May 21, 2002 build, but after upgrading to 1.7.6, it still doesn't work. I'm running SuSE Linux 8.0). JCP is now an Active Server Pages site with lots of javascript -- it may have been before, but I don't know. The front page doesn't even fully display and parts contain links but are not displayed. The site is totally useless under Mozilla. Even more recently eBay redesigned their web site. The only problem I have noticed to date is that pictures no longer display, but that is a major issue, making the site pretty well useless. eBay's site runs javascript, but, again, I don't know how it was set up previously.
> These comments may or may not directly relate to this bug Then they don't belong in this bug. They belong in separate bugs, one bug report per problem (so probably two separate bug reports in your case).
Depends on: 344890
Assignee: jdunn → nobody
QA Contact: tpreston → imagelib
Marking WONTFIX based on Comment 10.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: