Closed
Bug 252961
Opened 20 years ago
Closed 20 years ago
Image.onerror doesn't fire if image missing
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 269125
People
(Reporter: blmatthews, Unassigned)
References
(Depends on 1 open bug)
Details
Attachments
(1 file)
420 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040616 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040616 With: var img = new Image(); img.onerror = imageError; img.onload = imageLoad; img.src = 'file:///test.gif'; imageError isn't called if test.gif doesn't exist at root. imageLoad is called as expected if test.gif does exist at root. Reproducible: Always Steps to Reproduce: 1.Open attached sample file. 2.Make sure file:///test.gif doesn't exist. 3.Click Go. Actual Results: Nothing Expected Results: The imageError function should have run, resulting in an alert stating "Image failed to load."
Reporter | ||
Comment 1•20 years ago
|
||
Comment 2•20 years ago
|
||
I think a security issue is going on here. Mozilla is probably not firing the onerror event, because you use 'file:///'. When using 'http://' the onerror gets fired (at least it does here).
I see this using LInux 2004101106. I see this even when running from file://.
Comment 4•20 years ago
|
||
*** This bug has been marked as a duplicate of 269125 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Comment 5•16 years ago
|
||
We should add this testcase once we have file:// mochitests.
Depends on: 424484
Flags: in-testsuite?
Updated•5 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•