Bug Tracker

Modify

Ticket #6894 (closed bug: invalid)

Opened 3 years ago

Last modified 2 years ago

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:
Blocking: Blocked by:

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.

Change History

comment:1 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

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.

comment:2 Changed 2 years ago by rwaldron

#8086 is a duplicate of this ticket.

comment:3 Changed 2 years ago by rwaldron

#9416 is a duplicate of this ticket.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.