Skip to content

Commit 8494904

Browse files
committed
Багфикс: одинаковые id при одинаковых value в checkbox
1 parent 1a7eaa4 commit 8494904

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

addons/Запуск с телефона/launch.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
let root = document.createElement('div');
199199
for (let i = 0; i < formData.checkbox.length; i++) {
200200
let item = formData.checkbox[i];
201-
let id = item.value + i;
201+
let id = Math.random().toString(36).substr(2, 9);
202202
let input = `<input data-${obj.name}=${index + i} value="${item.value}" id="${id}" ${
203203
item.default ? 'checked' : ''
204204
} class="form-check-input" type="checkbox">`;

0 commit comments

Comments
 (0)