Skip to main content

Bug Tracker

Side navigation

#12972 closed bug (notabug)

Opened November 27, 2012 11:05PM UTC

Closed November 27, 2012 11:40PM UTC

Last modified November 28, 2012 12:41AM UTC

Strange selector bug in IE with <P><FORM> elements

Reported by: Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:

For me this is a strange selector bug to explain.

Try the testcase at:

In IE you will recieve an alert=3, remove the <P> element in front of the <FORM> element and you get the expected alert=5.

In Chrome|FF you get alert=5 as expected.

The bug probably exist in all version, but only tested in 1.7 and 1.8

Of course this is a serious bug, all $(form INPUT).events will not happen...

Attachments (0)
Change History (7)

Changed November 27, 2012 11:40PM UTC by dmethvin comment:1

resolution: → notabug
status: newclosed

Use the IE inspector to see what's going on. This isn't a jQuery bug and shouldn't be reported here. Ask for help on a forum if you need it.

Changed November 27, 2012 11:43PM UTC by Jonas Reinhardt <> comment:2

Can you please explain why this isn't a bug?

Or is it a bug in the selector enginge and not in jquery?

Did you try the jsfiddle?

Changed November 27, 2012 11:45PM UTC by dmethvin comment:3

Sure, post a screen shot of your results from the IE inspector and I can explain.

Changed November 27, 2012 11:59PM UTC by Jonas Reinhardt <> comment:4

From left:

1. Chrome or FF reporting 5

2. IE reporting 3

3. IE <P> element before <FORM> removed, reporting 5


Changed November 28, 2012 12:04AM UTC by dmethvin comment:5

You'll want to actually view the DOM to see which elements are children of which ones.

Changed November 28, 2012 12:40AM UTC by anonymous comment:6

Your markup is invalid. DIV is not allowed is not allowed in P. IE automatically inserts </p> before DIV which also closes form. So DIV is not children of form. Fix your markup.

Changed November 28, 2012 12:41AM UTC by dmethvin comment:7

The DOM viewer will show you that. :D