Closed Bug 1605800 Opened 6 years ago Closed 6 years ago

Load event doesn't always fire

Categories

(Core :: DOM: Core & HTML, defect)

71 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox71 --- wontfix
firefox72 --- wontfix
firefox73 --- wontfix

People

(Reporter: luke32j, Unassigned)

Details

Attachments

(1 file)

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.

Attached image fccbillerica.png

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,

Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: Core & HTML
Ever confirmed: true
Product: Firefox → Core

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.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID

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.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: