Use className instead of classList, as input may have spaces.

This commit is contained in:
voussoir 2020-09-12 13:14:55 -07:00
parent 5dcccae646
commit 2fad1c58fd

View file

@ -268,8 +268,8 @@ function init_button_with_confirm()
button.classList.remove("button_with_confirm"); button.classList.remove("button_with_confirm");
let holder = document.createElement("span"); let holder = document.createElement("span");
holder.className = button.dataset.holderClass || "";
holder.classList.add("confirm_holder"); holder.classList.add("confirm_holder");
holder.classList.add(button.dataset.holderClass || "confirm_holder");
button.parentElement.insertBefore(holder, button); button.parentElement.insertBefore(holder, button);
button.parentElement.removeChild(button); button.parentElement.removeChild(button);