#13606 closed bug (notabug)
":required" property selector causes error in IE9
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
In Firefox and Chrome, the selector $(':required') will correctly select any element with the HTML5 validation "required" property. In IE9, it returns this error:
SCRIPT5022: Syntax error, unrecognized expression: unsupported pseudo: required
Check it out in this fiddle: http://jsfiddle.net/G85tL/2/
Note if you change it from ":required" to "[required]", it works in all browsers.
Change History (2)
comment:1 Changed 10 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
comment:2 Changed 10 years ago by
I see what you mean, but let me be clearer. :required works in Firefox and Chrome because it is selected with QSA and is Selectors Level 4. In IE9, Selectors Level 4 is not supported, it throws an error, it falls back to jQuery, jQuery doesn't support it, so Sizzle correctly throws an error.
Sizzle is correctly throwing an error. ":required" is not a valid selector.