Bug Tracker

Opened 10 years ago

Closed 9 years ago

Last modified 8 years ago

#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:
Blocked by: Blocking:

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 (1)

test1.htm (345 bytes) - added by sohighthesky 10 years ago.

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by sohighthesky

Attachment: test1.htm added

comment:1 Changed 10 years ago by sohighthesky

you may also try to remove the doctype in IE8

comment:2 Changed 9 years ago by dmethvin

Priority: undecided
Summary: unsepecified attributelabel[for] selector inconsistent on IE

comment:3 Changed 9 years ago by dmethvin

Status: newopen

comment:4 Changed 9 years ago by danheberden

Resolution: cantfix
Status: openclosed

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 :(

Note: See TracTickets for help on using tickets.