Opened 9 years ago
Closed 9 years ago
#15091 closed bug (notabug)
jQuery reports error when selector's attribute is empty
Reported by: | kennykwok | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.11.1 |
Keywords: | selector | Cc: | |
Blocked by: | Blocking: |
Description
jsFiddle: http://jsfiddle.net/L5gHQ/
Both buttons should be working properly under jQuery 1.11.0 or before. In latest 1.11.1, the "Default" button strictly reports Javascript error (and this potentially break existing web site badly after upgrade)
I'm not sure if we should we consider this as a bug. It is a deal breaking issue, anyway, when considering upgrading jQuery.
Change History (2)
comment:1 Changed 9 years ago by
Status: | new → open |
---|
comment:2 Changed 9 years ago by
Resolution: | → notabug |
---|---|
Status: | open → closed |
This is a direct consequence of fixing #14793 (and even a problem case identified therein); observe the Syntax error, unrecognized expression: option[value=]
exception. To do what you want, just quote the attribute values: http://jsfiddle.net/L5gHQ/8/
I can confirm that this no longer works in 1.x, but what you're doing is just wrong.
selected
attribute: http://jsfiddle.net/rwaldron/VLVRr/@timmywil or @gibson042 does this issue look familiar?