Skip to main content

Bug Tracker

Side navigation

#6894 closed bug (invalid)

Opened August 10, 2010 02:20PM UTC

Closed August 11, 2010 12:37AM UTC

Last modified May 24, 2011 10:45PM UTC

Can not select first nested form.

Reported by: joeygreen Owned by:
Priority: Milestone: 1.4.3
Component: selector Version: 1.4.2
Keywords: selector, form, nested Cc:
Blocked by: Blocking:
Description

I realize that nesting forms in HTML is incorrect but also know that a lot of developers do this for ajax form submission that utilizes the jQuery.Serialize() function among other things.

it appears that jQuery will not select the first nested form element but will select all subsequent form elements nested within a parent form tag.

My current workaround is create a dummy form to place in the first position in order to select my intended form via any jQuery selector.

Attachments (0)
Change History (3)

Changed August 11, 2010 12:37AM UTC by dmethvin comment:1

resolution: → invalid
status: newclosed

Since nested forms are invalid and the browser isn't obligated to do anything predictable with invalid html, it's unlikely jQuery can fix this. It's not clear from your description what the browser (Firefox? IE? Chrome? Safari?) is doing with the invalid markup, but it may be removing the nested form tag. Try creating a test case.

Changed January 28, 2011 11:30PM UTC by rwaldron comment:2

#8086 is a duplicate of this ticket.

Changed May 24, 2011 10:45PM UTC by rwaldron comment:3

#9416 is a duplicate of this ticket.