If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Loading message is stuck on SVG animation.



Tech Evangelism Graveyard
English US
4 years ago
3 years ago


(Reporter: bogdan_maris, Unassigned)






4 years ago
Reproducible on 26 beta 7 (BuildID: 20131122094025):
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:26.0) Gecko/20100101 Firefox/26.0
Reproducible on the latest Aurora (BuildID: 20131125004001):
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:27.0) Gecko/20100101 Firefox/27.0
Reproducible on the latest Nightly (BuildID: 20131125030201): 
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:28.0) Gecko/20100101 Firefox/28.0

Steps to reproduce:
1. Start Firefox.
2. Open link http://svg-wow.org/audio/animated-lyrics.svg
3. Click on the Loading message.

Expected results: The Loading message disappears and "click to start" message is prompted.

Actual results: Loading message is stuck and no "click to start" message appears.

1. This issue is not a regression: it reproduces back to Firefox 4.0.
[15:16:05.640] TypeError: animateLoadingAudio is undefined @ http://svg-wow.org/audio/animated-lyrics.js:508

Somehow the variable didn't initialise. Needs a reduced testcase really.
So, the testcase has:
    <g id="instructions" font-family="Arial,Helvetica,sans-serif"
        font-weight="bold" text-anchor="middle" display="none" opacity="0"

...which is what sets up the first (javascript) animation.

That doesn't run, because we only honor 'onload' on <svg> elements, not on <g>,<rect>, etc.

(FWIW, there's also:
        <rect id="bgFill" fill="url(#imagePattern)" rx="10" ry="10"
                width="100%" height="100%" onload="onBackgroundLoad();"/>
which has the same problem, but that not as related to the reported issue in this bug.)
Well we're not going to support that so the site needs to change. Either this is WONTFIX or it needs migrating to evangelism
(For those missing background: I believe "onload support on nested SVG elements" is tracked in Bug 571134, which is WONTFIX, and bug 552938 comment 27 explains why we decided no to support it.)
Looks like Vincent wrote this demo. Vincent, any chance you'd be willing to change the demo to fire onload from <svg> elements instead of <g> and <rect>?

Seems like it's a pretty minimal tweak -- I didn't test thoroughly, but it seems to work if I just insert e.g.
     <svg onload="initLoadingAudio()"/>
right after the closing </g> for the code quoted at beginning of comment 2 (replacing the <g>'s onload).
Assignee: nobody → english-us
Component: SVG → English US
Flags: needinfo?(vincent_hardy)
Product: Core → Tech Evangelism
(In reply to Daniel Holbert [:dholbert] from comment #4)
> (For those missing background: I believe "onload support on nested SVG
> elements" is tracked in Bug 571134, which is WONTFIX

er, to be clear: s/nested SVG elements/any SVG element besides <svg>/ :)
WFM in FF29. Audio loads and plays as expected.
Last Resolved: 4 years ago
Flags: needinfo?(vincent_hardy)
Resolution: --- → WORKSFORME
Nice! WFM too.

Looks like the demo was updated to fix this -- initLoadingAudio() is now in the root <svg> onload handler, instead of in an onload for a <g> element. (The <g> element quoted in comment 2 now has no "onload" attribute.)

 --> Updating resolution to FIXED
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.