Closed Bug 1474311 Opened 6 years ago Closed 4 years ago

Svg image fires error events before it is loaded

Categories

(Core :: SVG, defect, P3)

defect

Tracking

()

VERIFIED FIXED
83 Branch
Tracking Status
firefox83 --- verified

People

(Reporter: al.govorkova, Assigned: longsonr)

References

()

Details

(Keywords: parity-chrome, parity-safari, testcase)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36 Steps to reproduce: 1. Create a SVG element with <image> with valid href using 'implementation.createHTMLDocument'. 2. Get the <image> and paste it inside main document with SVG element. 3. Add two listeners to the image: 'load' and 'error' All this steps are done here https://codepen.io/anon/pen/ajoEJz?editors=1111 Take a look at console Issue is reproduced with versions 61 and 63 (nightly) Actual results: 'error' event is fired two times, then 'loaded' event is fired Expected results: Only 'loaded' event is fired
I also tried to create svg and image using 'new DOMParser().parseFromString', but result is the same: https://codepen.io/anon/pen/ejOVxR?editors=1111
Component: Untriaged → DOM: Events
Product: Firefox → Core
Component: DOM: Events → SVG
Priority: -- → P3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: parity-safari
Version: 63 Branch → Trunk
Assignee: nobody → longsonr
Status: NEW → ASSIGNED
Pushed by longsonr@gmail.com: https://hg.mozilla.org/integration/autoland/rev/d40bd2d0160e check whether we should load images r=jwatt
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
QA Whiteboard: [qa-83b-p2]
Flags: in-testsuite+

Reproduced the initial issue using an old Nightly before the fix, verified that this is fixed on Firefox 83.0b10 across platforms (Windows 10 64bit, Ubuntu 18.04 and macOS 11.0)

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-83b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: