We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6378916 commit 5337c97Copy full SHA for 5337c97
src/utils.js
@@ -261,6 +261,12 @@ export function cloneNode(node) {
261
field.value = fields[i].value;
262
}
263
264
+ // Fixes an issue with original radio buttons losing their value once the
265
+ // clone is inserted in the DOM, as radio button `name` attributes must be unique
266
+ if (field.type === 'radio' && field.name) {
267
+ field.name = `__sortableClone__${field.name}`;
268
+ }
269
+
270
if (field.tagName === NodeType.Canvas) {
271
const destCtx = field.getContext('2d');
272
destCtx.drawImage(fields[i], 0, 0);
0 commit comments