Side navigation
#4723 closed bug (duplicate)
Opened June 03, 2009 08:07PM UTC
Closed October 01, 2010 09:10PM UTC
Last modified March 09, 2012 11:48AM UTC
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: |
Description
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"> <head> <style type="text/css">v\\: * { behavior:url(#default#VML); display:inline-block }</style> ... </head> <body> ... <v:shape ... ></v:shape> ... <script type="text/javascript"> $(":button"); // This is where the error is raised! </script> </body> </html>
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 ;-)
btw: jQuery is A WONDERFUL PIECE OF CODE !!
Keep on going Guys ;-)
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.