From 9c07c5877a00cbb5a11bc1671e6fd0245fd5a07d Mon Sep 17 00:00:00 2001 From: Martin Terber Date: Fri, 15 Oct 2021 15:46:30 +0200 Subject: [PATCH] [BUGFIX] avoid duplicate random clone ids - increased the Math.random multiplier --- .../Public/JavaScript/Form/Frontend/RepeatableContainer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Public/JavaScript/Form/Frontend/RepeatableContainer.js b/Resources/Public/JavaScript/Form/Frontend/RepeatableContainer.js index af89b05..79e504d 100644 --- a/Resources/Public/JavaScript/Form/Frontend/RepeatableContainer.js +++ b/Resources/Public/JavaScript/Form/Frontend/RepeatableContainer.js @@ -53,7 +53,7 @@ $(document).on('initialize-repeatable-container-copy-buttons', function(event, c $('[id]', $subject).each(function(e) { var $element = $(this), id = $element.attr('id'), - newId = Math.floor(Math.random() * 42) + Date.now(); + newId = Math.floor(Math.random() * 99999999) + Date.now(); $element.attr('id', newId); idReplacements[id] = newId;