From 2fad1c58fdfed82b42a000c9741206875f0ec902 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 12 Sep 2020 13:14:55 -0700 Subject: [PATCH] Use className instead of classList, as input may have spaces. --- frontends/etiquette_flask/static/js/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontends/etiquette_flask/static/js/common.js b/frontends/etiquette_flask/static/js/common.js index 631ac9b..5061dde 100644 --- a/frontends/etiquette_flask/static/js/common.js +++ b/frontends/etiquette_flask/static/js/common.js @@ -268,8 +268,8 @@ function init_button_with_confirm() button.classList.remove("button_with_confirm"); let holder = document.createElement("span"); + holder.className = button.dataset.holderClass || ""; holder.classList.add("confirm_holder"); - holder.classList.add(button.dataset.holderClass || "confirm_holder"); button.parentElement.insertBefore(holder, button); button.parentElement.removeChild(button);