Check out this interactive shopping list. You can add items, delete them, and mark them as completed. Adding and deleting items works fine, but there's an issue when toggling them.
Issue (occurs when toggling multiple list items)
If you add 3 items (xxx, yyy, zzz) and try to toggle them individually, it works. But if you select xxx, then zzz, and try to toggle zzz again, it doesn't work. However, clicking xxx will mark it as incomplete.
Error
script.js:91 Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node. at HTMLLIElement.toggleItem
Take a look at my code below.
Let's say you have added are 3 items (xxx,yyy,zzz) and upon clicking them individually, it will toggle them as complete and incomplete.but if you have selected the xxx, them zzz and if you click again zzz, it's not working.While if click the xxx, it will mark as incomplete.