Side navigation
#7407 closed bug (duplicate)
Opened November 05, 2010 06:47AM UTC
Closed November 05, 2010 08:16AM UTC
Last modified November 05, 2010 08:16AM UTC
find() doesn't work in IE8
Reported by: | xxli79 | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.5 |
Component: | unfiled | Version: | 1.4.3 |
Keywords: | find IE8 doctype | Cc: | |
Blocked by: | Blocking: |
Description
With xhtml "DOCTYPE" and a input element with id as "id", the .find() method will throw a exception at line 3908.
If I reomve the "DOCTYPE" line or rename the id value, it works fine.
And the 3908 line is: .. context.id ..., If use getAttribute and setAttribute to get/set the id value, it works too.
Below is the test code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>title</title> <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.3.js"></script> </head> <body> <form><input value="111" id="id" /></form> <script> alert( $("form").find('input').length ) </script> </body> </html>
This has already been fixed and will be in 1.4.4. See also e.g #7212