DataTable nests `<form>` inside `<form>`
Nessuno ha ancora preso questa issue.
- Lingua principale
- Ruby
- Stelle
- 1k
- Fork
- 67
- Merge medio
- 3g 12h
- PR unite (30g)
- 14
Descrizione
- Where:
DataTableFormwraps the table;DataTableSearchand
DataTablePerPageSelecteach render their own<form>inside it.
Snapshotdata_table/full_frameholds three<formelements. - Effect: nested forms are invalid HTML. A browser ignores the inner
<form>start tags when a form is in scope, so the search input and the
per-page select become children of the outer bulk form, and
this.form.requestSubmit()indata_table_search_controller.jssubmits
the wrong form. - Fix: render the search and per-page forms outside the bulk form, or
make their controls reference it with theform=attribute; re-record (on the 2.0 line)
data_table/*. - 2.0 note: Herb's
NestingValidatorwill likely reject this at compile
time, which makes it a template adjustment in the DataTable migration.
Fixing it on 1.6 first keeps the migration a pure port.
Surfaced by the golden HTML suite (PR #536), which pins what 1.6 renders today — this defect included. Per maintainer decision (2026-09-19) main stays as is: this is addressed on the 2.0 line, and the golden snapshot that pins it is re-recorded there with the diff reviewed.
Source: design/v2/follow-up-issues.md.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con DataTableForm, DataTableSearch, DataTablePerPageSelect e data_table_search_controller.js, poi esamina lo snapshot data_table/full_frame e gli altri snapshot data_table. Conferma la struttura del form renderizzato e il modo in cui requestSubmit() seleziona la propria destinazione. Il lavoro è completato quando i template 2.0 evitano i form annidati e gli snapshot data_table/* vengono registrati nuovamente e verificati con l’output corretto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, ruby
- Ambito
- frontend, testing
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Attiva
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 68/100