From df2570337528c63a3f52e0fca3a2da3016e96fdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Mon, 5 Jun 2023 23:03:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=BE=A9=E8=87=AA=E5=8B=95=E5=A1=AB?= =?UTF-8?q?=E5=80=BC=E6=99=82=EF=BC=8C=E6=9C=83=E8=A6=86=E8=93=8Bname?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/asks_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/asks_controller.rb b/app/controllers/asks_controller.rb index 79833a6..bc5978c 100644 --- a/app/controllers/asks_controller.rb +++ b/app/controllers/asks_controller.rb @@ -530,7 +530,9 @@ class AsksController < ApplicationController old_input = old_.find('input, select'); if(new_input.length != 0 && old_input.length != 0){ if(new_input.length == old_input.length){ - old_.clone().replaceAll(new_); + var old_clone = old_.clone(); + old_clone.find('input, select').attr('name', new_input.attr('name')); + old_clone.replaceAll(new_); } } }