Bug 19047 - Selectors API querySelector won't match uppercase class names in quirks mode
Summary: Selectors API querySelector won't match uppercase class names in quirks mode
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2008-05-14 10:17 PDT by Lachlan Hunt
Modified: 2022-08-09 09:24 PDT (History)
7 users (show)

See Also:

Quirk Mode - Test Case (145 bytes, text/html)
2022-08-09 09:23 PDT, Ahmad Saleem
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lachlan Hunt 2008-05-14 10:17:25 PDT
The Selectors API querySelector and querySelectorAll methods won't match uppercase class names in quirks mode.

e.g. Try running this script in quirks mode.

<p class="FOO"></p>
var p = document.querySelector(".FOO");
document.write(p ? "PASS" : "FAIL");

The same script works correctly in standards mode.
Comment 1 Alex Russell 2009-03-05 10:34:56 PST
note, this also affects getElementsByClassName in quirks mode
Comment 2 David Smith 2009-03-06 21:45:02 PST
I can't reproduce this (I pasted the provided testcase into a document and loaded it in safari 4 beta, and it said PASS, same with r40738).
Comment 3 Ahmad Saleem 2022-08-09 09:23:43 PDT
Created attachment 461503 [details]
Quirk Mode - Test Case

I changed the test case from Comment 0 in JSfiddle below:

Link - https://jsfiddle.net/6r9odj5x/show

All browsers (Chrome Canary 106, Firefox Nightly 105 and Safari 15.6 on macOS 12.5) are saying "PASS" for the test case, I am going to mark this as "RESOLVED CONFIGURATION CHANGED"

Even with above "Quirk Mode" test case, all browsers are showing "PASS". Thanks!