Closed Bug 911268 Opened 11 years ago Closed 11 years ago

Multiple arguments ignored for elem.classList.add()

Categories

(Firefox :: Untriaged, defect)

23 Branch
x86
All
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 814014

People

(Reporter: jonobr1, Unassigned)

References

()

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.62 Safari/537.36 Steps to reproduce: I made a div in JavaScript and added two classes to it through classList.add based on the documentation listed here: https://developer.mozilla.org/en-US/docs/Web/API/element.classList You can find an example of this here: https://dl.dropboxusercontent.com/u/1595444/issues/firefox/classlist-add-bug.html Actual results: The div is red. Expected results: The div should be blue because there should be two classes on the div. This works fine in webkit. You can see in the screenshot provided that the upper left hand browser (chrome) shows blue. The lower left hand browser (firefox) shows red, which is incorrect. The upper right hand shows the documentation on the Mozilla site stating that you should be able to add multiple classes like classList.add('a', 'b'). Finally, the lower right hand shows the code to produce the two browser cases which follows the same paradigm as the Mozilla docs.
Severity: normal → critical
Fixed in Nightly26.0a1
Severity: critical → normal
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
OS: Mac OS X → All
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: