Bug Tracker

Modify

Ticket #7407 (closed bug: duplicate)

Opened 3 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

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

comment:1 Changed 3 years ago by jitter

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

comment:2 Changed 3 years ago by addyosmani

  • Keywords find IE8 doctype added
  • Status changed from new to closed
  • Resolution set to duplicate

comment:3 Changed 3 years ago by addyosmani

Duplicate of #7212.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.