DataTable nests `<form>` inside `<form>`
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Ruby
- Star
- 1k
- Fork
- 67
- Merge trung bình
- 3 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 14
Mô tả
- 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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với DataTableForm, DataTableSearch, DataTablePerPageSelect và data_table_search_controller.js, sau đó kiểm tra snapshot data_table/full_frame và các snapshot data_table khác. Xác nhận cấu trúc của biểu mẫu được render và cách requestSubmit() chọn đích của nó. Công việc được xem là hoàn tất khi các template 2.0 tránh các biểu mẫu lồng nhau và các snapshot data_table/* được ghi lại và xem xét với đầu ra đã được sửa.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, ruby
- Lĩnh vực
- frontend, testing
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 68/100