Skip to main content

Bug Tracker

Side navigation

#5040 closed bug ()

Opened August 12, 2009 05:42PM UTC

Closed November 11, 2010 11:09PM UTC

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

Attachments (0)
Change History (2)

Changed October 20, 2010 09:40PM UTC by snover comment:1

owner: johnmichaelmayer
status: newpending

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!

Changed November 11, 2010 11:09PM UTC by trac-o-bot comment:2

status: pendingclosed

Automatically closed due to 14 days of inactivity.