Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#12895 closed bug (notabug)

Find does not find element in IE 9

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.1
Keywords: Cc:
Blocked by: Blocking:


The best way to describe this bug is show code that illustrates it:

<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript">
$(function() {

<form id="_edit_form" name="_edit_form">
	<td><input type="text" name="test_field" id="test_field" size="25" value="" /></td>

<form id="_edit_form2" name="_edit_form2">
<input type="text" name="test_field2" id="test_field2" size="25" value="" />

<form id="_edit_form3" name="_edit_form3">
	<td><input type="text" name="test_field3" id="test_field3" size="25" value="" /></td>


This simply creates 3 input fields and JQuery sets the values of each. In IE 9, the first one does not get set because JQuery doesn't find it. Something about the combination of <p> and <table> causes JQuery to not find the field. Removing either the <p> or <table> fixes the problem, as illustrated in the 2nd and 3rd fields. All three work in Safari, Chrome, Firefox and IE 8.

Change History (2)

comment:1 Changed 10 years ago by timmywil

Resolution: notabug
Status: newclosed

The html is invalid. p tags can only include "phrasing content", which does not include table tags: http://dev.w3.org/html5/spec/content-models.html#phrasing-content-1.

comment:2 Changed 10 years ago by anonymous

Ok, I understand, however, it begs two questions: 1) why does JQuery work in this context in every browser except IE 9? and 2) why does every browser render it the way one would expect it to look were it valid?

Note: See TracTickets for help on using tickets.