Rearrange confirm_onclick because they have return statements now.

Now that data-onclick begins with a return statement, this code was
not running.
master
voussoir 2020-09-12 14:33:15 -07:00
parent 2fad1c58fd
commit be7decf330
1 changed files with 2 additions and 3 deletions

View File

@ -332,12 +332,11 @@ function init_button_with_confirm()
delete button.dataset.cancelClass; delete button.dataset.cancelClass;
// If this is stupid, let me know. // If this is stupid, let me know.
let confirm_onclick = button.dataset.onclick + ` let confirm_onclick = `
;
let holder = event.target.parentElement.parentElement; let holder = event.target.parentElement.parentElement;
holder.getElementsByClassName("confirm_holder_stage1")[0].classList.remove("hidden"); holder.getElementsByClassName("confirm_holder_stage1")[0].classList.remove("hidden");
holder.getElementsByClassName("confirm_holder_stage2")[0].classList.add("hidden"); holder.getElementsByClassName("confirm_holder_stage2")[0].classList.add("hidden");
` ` + button.dataset.onclick;
button_confirm.onclick = Function(confirm_onclick); button_confirm.onclick = Function(confirm_onclick);
button.removeAttribute("onclick"); button.removeAttribute("onclick");
button.onclick = function(event) button.onclick = function(event)