Bug Tracker

Modify

Ticket #4040 (closed bug: wontfix)

Opened 4 years ago

Last modified 4 years ago

Attribute Filters bug in IE (document vs. document.body)

Reported by: colorwind.zhf Owned by: john
Priority: major Milestone: 1.3.2
Component: selector Version: 1.3.1
Keywords: ie document body Cc:
Blocking: Blocked by:

Description

<div class="cs1" name="node1"></div>

The code: $(".cs1[name='node1']") can not match this node in IE.

Attachments

test.html Download (952 bytes) - added by colorwind.zhf 4 years ago.
test file
ie7test.JPG Download (88.2 KB) - added by colorwind.zhf 4 years ago.
test in ie7
ie6test.JPG Download (47.9 KB) - added by colorwind.zhf 4 years ago.
test in ie 6

Change History

comment:1 Changed 4 years ago by dmethvin

I tried creating a test case but it worked for me. What version of IE and what doctype? Can you provide a complete test case?

Changed 4 years ago by colorwind.zhf

test file

Changed 4 years ago by colorwind.zhf

test in ie7

Changed 4 years ago by colorwind.zhf

test in ie 6

comment:2 Changed 4 years ago by dmethvin

  • Keywords ie added
  • need changed from Review to Patch
  • Component changed from unfilled to selector
  • Owner set to john

Confirmed, this also fails in IE8 RC1. Putting the code in a .ready() doesn't help either. Thanks for the test case!

comment:3 Changed 4 years ago by dmethvin

  • Keywords document body added
  • Summary changed from Attribute Filters bug in IE to Attribute Filters bug in IE (document vs. document.body)

Also reported in #4084.

comment:4 follow-up: ↓ 5 Changed 4 years ago by john

  • Status changed from new to closed
  • Resolution set to wontfix

Actually, this isn't related to #4084 - this has to do with using getElementsByName.

The problem here is that you have an invalid attribute on an element (name attributes aren't valid on divs). Thus IE is having trouble finding them - I recommend using a different attribute instead (maybe a class - or an ID?).

comment:5 in reply to: ↑ 4 Changed 4 years ago by colorwind.zhf

Thanks

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.