IE 7-8-9 Jquery-Sizzle.selectors Issue

237 views
Skip to first unread message

Grigor Farishyan

unread,
Jul 28, 2011, 7:05:14 PM7/28/11
to SWFUpload
Hello.

I'm working on a drupal project on which integrated swfupload.

It works fine on Firefox, Chrome etc. Except IE 7/8/9

Browser Document mode set to same version ( Ie 7/7) ( IE8/8) (IE 9/9).

The issue become available when user click on swfbutton. IE JS debuger
result ( object expected ).

The issue become on about 2002 line

return elem.nodeType === 1 && elem.getAttribute("id") === match;

I have debuged and found that elem is Object tag and elem.nodeType =1.
the error become available on elem.getAttribute("id") -> object
expected.

I have solved this issue just entering try catch inside
Sizzle.selector, so code right now is
try {
return elem.nodeType === 1 && elem.getAttribute("id") === match;
}
catch (e) {
return elem.nodeType === 1 && elem.id === match;
}


this one works well for IE too.

As you understand I've changed JQuery core which is not so well :).
So how to solve this issue without touching Jquery core ?

Thanks.

netsi1964

unread,
Jul 13, 2012, 3:50:56 AM7/13/12
to swfu...@googlegroups.com
Hi Gregor,

Thank you for sharing your soloution.

I have also come across this IE9 issue. In my setup I would use feature or browser detection and then use my own custom code if it is a known problem.
That is a simple test with if statements.

/Sten
Reply all
Reply to author
Forward
0 new messages