JS execution/initialization order issue in Tabzilla

VERIFIED FIXED

Status

VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: jpetto, Assigned: jpetto)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

5 years ago
The self-executing function that calls the init function in tabzilla.js is declared before the content var is initialized, (possibly) resulting in undefined content.

This bug has not shown up on mozilla.org likely due to init being called within $(document).ready. mozilla.org's doc.ready must take long enough for the parser to evaluate the content var's initialization.

Fix should be to move the self-executing function to the end of tabzilla.js, after all var's have been initialized.

This issue was reported by David Walsh when implementing Tabzilla on MDN. Testing the fix suggested above fixed the issue for MDN.
(Assignee)

Updated

5 years ago
Assignee: nobody → jon

Comment 1

5 years ago
Commits pushed to master at https://github.com/mozilla/bedrock

https://github.com/mozilla/bedrock/commit/f25ead42d1655dfc81c2e965fb45ab6a60a3c368
Move self-executing function to end of tabzilla.js. Bug 950121

https://github.com/mozilla/bedrock/commit/51f78b6955d5f364363f929a34d0e958a41579cc
Merge pull request #1521 from jpetto/bug-950121-tabzilla-js-bug

Move self-executing function to end of tabzilla.js. Bug 950121
fixed o stage https://www.allizom.org/en-US/
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.