Skip to main content

Bug Tracker

Side navigation

#6156 closed bug (cantfix)

Opened February 24, 2010 03:01AM UTC

Closed March 30, 2011 09:29PM UTC

Last modified March 13, 2012 11:50PM UTC

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 (0.3 KB) - added by sohighthesky February 24, 2010 03:03AM UTC.
Change History (4)

Changed February 24, 2010 03:05AM UTC by sohighthesky comment:1

you may also try to remove the doctype in IE8

Changed November 12, 2010 04:36AM UTC by dmethvin comment:2

priority: → undecided
summary: unsepecified attributelabel[for] selector inconsistent on IE

Changed November 15, 2010 03:41AM UTC by dmethvin comment:3

status: newopen

Changed March 30, 2011 09:29PM UTC by danheberden comment:4

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