Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#12972 closed bug (notabug)

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

Reported by: jonas@… 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: http://jsfiddle.net/jorese/Bzc7M/ 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...

Change History (7)

comment:1 Changed 11 years ago by dmethvin

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.

comment:2 Changed 11 years ago by Jonas Reinhardt <jonas@…>

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?

comment:3 Changed 11 years ago by dmethvin

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

comment:4 Changed 11 years ago by Jonas Reinhardt <jonas@…>

From left:

  1. Chrome or FF reporting 5
  2. IE reporting 3
  3. IE <P> element before <FORM> removed, reporting 5


comment:5 Changed 11 years ago by dmethvin

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

comment:6 Changed 11 years ago by anonymous

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.

comment:7 Changed 11 years ago by dmethvin

The DOM viewer will show you that. :D

Note: See TracTickets for help on using tickets.