Ticket #6156 (closed bug: cantfix)
label[for] selector inconsistent on IE
| Reported by: | sohighthesky | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.4.2 |
| Component: | selector | Version: | 1.4.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
the css selector "label[for]" in IE, it will not return the element which has a "for" attribute valued ""(empty string), but in other browses the selector will return all LABEL elements that specified "for" attribute
Attachments
Change History
comment:2 Changed 3 years ago by dmethvin
- Priority set to undecided
- Summary changed from unsepecified attribute to label[for] selector inconsistent on IE
comment:4 Changed 2 years ago by danheberden
- Status changed from open to closed
- Resolution set to cantfix
Unfortunately, IE doesn't distinguish between attributes that are present http://danheberden.com/share/b9cacb3.png - if you specify a blank string or nothing at all, htmlFor is still ""
In browsers like chrome, attributes is an array which means we can check if it was present at at all. http://danheberden.com/share/f61812.png
Thus, a limitation of IE unfortunately :(
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

