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.
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.