Bug Tracker

Modify

Ticket #6156 (closed bug: cantfix)

Opened 3 years ago

Last modified 15 months ago

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

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

Change History

Changed 3 years ago by sohighthesky

comment:1 Changed 3 years ago by sohighthesky

you may also try to remove the doctype in IE8

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:3 Changed 3 years ago by dmethvin

  • Status changed from new to open

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.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.