Load event doesn't always fire
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: luke32j, Unassigned)
Details
Attachments
(1 file)
|
191.00 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0
Steps to reproduce:
The background does not show on https://www.fccbillerica.org/ because the detection of load does not always happen for images, but it works fine on other browsers.
For example you can see at http://jsfiddle.net/8c42a3tn the alert does not pop up.
On one install on one computer, it is working on fccbillerica and when I click run on that jsfiddle it does show the alert('loaded').
Actual results:
Firefox doesn't let scripts know an image loaded in some circumstances, where other browsers are working.
Expected results:
Load event should happen on load.
Hi, luke32j!
Thanks for your contribution!
I could reproduce the described behavior in:
Windows 10 and Ubuntu 18.0.4
Firefox Nightly 73.0a1 (2019-12-30) (64-bit)
Firefox 71.0
I'll add product and component to this issue so we can keep working on it.
Regards,
Comment 3•6 years ago
|
||
The test is racy. Image may have been loaded already before the load event listener is added to the img element.
Can you reproduce with http://jsfiddle.net/cbnmj4xt/ (I can't) ?
Please reopen if I'm missing something here.
I should note that although this was an issue with WP Rocket plugin, the issue seemingly only happened on Firefox. So may possibly be a bug or inconsistency.
Site does not have an issue now so you can close this bug thank you.
Updated•6 years ago
|
Description
•