Bug Tracker

Opened 14 years ago

Closed 13 years ago

Last modified 12 years ago

#4723 closed bug (duplicate)

VML + IE + jQuery = "Failed"

Reported by: windi Owned by: john
Priority: undecided Milestone: 1.3.2
Component: selector Version: 1.3.2
Keywords: vml msie selector Cc:
Blocked by: Blocking:


In MSIE7 (what i have tested so far) an error (stating "Failed") is raised whenever a jQuery using PseudoSelectors (:button, :visible, ...) is executed within a page containing VML elements, e.g.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns="http://www.w3.org/1999/xhtml">
        <style type="text/css">v\: * { behavior:url(#default#VML); display:inline-block }</style>
        <v:shape ... ></v:shape>
        <script type="text/javascript">
            $(":button"); // This is where the error is raised!

After some debugging I discovered the Sizzle.selectors.filters being responsible for the error (though this is definitely a IE-Bug...).

What Google spit out: ticket:3265, ticket:4016, VML + IE + jQuery 1.3.2 has me confused

Neither of these fixed my problem, so I wrote a tiny patch for jQuery/Sizzle. I'm not sure if this fixes all problems, but wfm (works for me *smile*)

Please review my code and feel free to use whatever might be usable.

Cheers, Windi ;-)


Keep on going Guys ;-)

Attachments (2)

ie_vml_sizzlepatch.js (1.9 KB) - added by windi 14 years ago.
JavaScript file containing the patch for Sizzle
ie_vml_sizzlepatch_2.js (3.1 KB) - added by mitya_mukhin 13 years ago.

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by windi

Attachment: ie_vml_sizzlepatch.js added

JavaScript file containing the patch for Sizzle

comment:1 Changed 14 years ago by olau

I just saw this too on IE 6. In this case it broke the browser to the extent that I had to restart it, hard reloading the page with Ctrl+F5 wasn't enough.

Changed 13 years ago by mitya_mukhin

Attachment: ie_vml_sizzlepatch_2.js added

comment:2 Changed 13 years ago by mitya_mukhin

Windi's patch is great, though it didn't work correctly for me with some selectors (e.g. :radio:checked didn't work). The revised patch is attached above.

comment:3 Changed 13 years ago by snover

Resolution: duplicate
Status: newclosed

This is a duplicate of #7071. (More information, as well as a pull request, are available for #7071.)

Note: See TracTickets for help on using tickets.