Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#7407 closed bug (duplicate)

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>

Change History (3)

comment:1 Changed 9 years ago by jitter

This has already been fixed and will be in 1.4.4. See also e.g #7212

comment:2 Changed 9 years ago by addyosmani

Keywords: find IE8 doctype added
Resolution: duplicate
Status: newclosed

comment:3 Changed 9 years ago by addyosmani

Duplicate of #7212.

Note: See TracTickets for help on using tickets.