From 17859b70e96f50bca203d229d2c8315fb44bb09c Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sat, 22 Feb 2020 17:40:34 +0100 Subject: [PATCH] Fix tag suggestions. --- templates/PhotoPage.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/PhotoPage.php b/templates/PhotoPage.php index 91ed7dc..2fdfbaf 100644 --- a/templates/PhotoPage.php +++ b/templates/PhotoPage.php @@ -189,9 +189,9 @@ class PhotoPage extends SubTemplate }; var tagRemovalTargets = document.getElementsByClassName("delete-tag"); - Array.forEach(tagRemovalTargets, function(el) { - el.addEventListener("click", removeTag); - }); + for (var i = 0; i < tagRemovalTargets.length; i++) { + tagRemovalTargets[i].addEventListener("click", removeTag); + } var tag_autosuggest = new TagAutoSuggest({ inputElement: "new_tag",