From e8201f4727a5961c2a6207e1a34eb66cf977a42d Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Thu, 11 May 2023 20:16:46 -0400 Subject: [PATCH] Fixed element deletions not working consistently --- web/_js/main/draw.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/_js/main/draw.js b/web/_js/main/draw.js index dafafd5a..73240d09 100644 --- a/web/_js/main/draw.js +++ b/web/_js/main/draw.js @@ -578,7 +578,7 @@ function initDraw() { inputButton.className = "btn btn-outline-secondary" inputButton.title = "Remove website" inputButton.innerHTML = '' - inputButton.addEventListener('click', () => removeFieldButton(inputGroup, array, index)) + inputButton.addEventListener('click', () => removeFieldButton(inputGroup, websiteGroupElements, index)) } inputGroup.appendChild(inputButton) } @@ -621,7 +621,7 @@ function initDraw() { inputButton.className = "btn btn-outline-secondary" inputButton.title = "Remove subreddit" inputButton.innerHTML = '' - inputButton.addEventListener('click', () => removeFieldButton(inputGroup, array, index)) + inputButton.addEventListener('click', () => removeFieldButton(inputGroup, subredditGroupElements, index)) } inputField.addEventListener('paste', event => { @@ -666,7 +666,7 @@ function initDraw() { inputButton.className = "btn btn-outline-secondary" inputButton.title = "Remove Discord invite" inputButton.innerHTML = '' - inputButton.addEventListener('click', () => removeFieldButton(inputGroup, array, index)) + inputButton.addEventListener('click', () => removeFieldButton(inputGroup, discordGroupElements, index)) } inputField.addEventListener('paste', event => { @@ -705,7 +705,7 @@ function initDraw() { inputButton.className = "btn btn-outline-secondary" inputButton.title = "Remove wiki page" inputButton.innerHTML = '' - inputButton.addEventListener('click', () => removeFieldButton(inputGroup, array, index)) + inputButton.addEventListener('click', () => removeFieldButton(inputGroup, wikiGroupElements, index)) } inputGroup.appendChild(inputButton) }