Bug Tracker

Modify

Ticket #5040 (closed bug)

Opened 4 years ago

Last modified 3 years ago

Selector #foo a[href=#x/y] fails in IE7

Reported by: michaelmayer Owned by: michaelmayer
Priority: critical Milestone: 1.4
Component: selector Version: 1.3.2
Keywords: selector, internet explorer, ie7 Cc:
Blocking: Blocked by:

Description

As described in the summary, $('#foo a[href=#bar/xyz]') returns no elements in IE7, whereas it works as expected with Safari 4 and Firefox 3.5. I could not test it with IE8. It also returns elements, if I change it to $('#foo a:last') for example, so it finds anchor elements, just the attribute selector seems broken for Internet Explorer.

There was a similar bug with input[for=bar], which was broken for IE in jQuery 1.3. See #3794.

Change History

comment:1 Changed 3 years ago by snover

  • Owner changed from john to michaelmayer
  • Status changed from new to pending

Be aware that elements generated in IE using innerHTML, .html(html), or $(html) with a href attribute will have the href attribute mangled into an absolute path in IE<8, and there is no way that we can really work around that.

If this is still a problem in current versions of jQuery, and you are not creating the elements using one of the previously mentioned methods, please submit a reduced test case. Thanks!

comment:2 Changed 3 years ago by trac-o-bot

  • Status changed from pending to closed

Automatically closed due to 14 days of inactivity.

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.