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",