Fix bad check of ElementsByTagName.

This commit is contained in:
voussoir 2019-06-15 13:04:33 -07:00
parent 9ab0a61cb3
commit 4ab352a74d

View file

@ -229,10 +229,10 @@ function init_button_with_confirm()
var holder = event.target.parentElement.parentElement; var holder = event.target.parentElement.parentElement;
holder.getElementsByClassName("confirm_holder_stage1")[0].classList.add("hidden"); holder.getElementsByClassName("confirm_holder_stage1")[0].classList.add("hidden");
holder.getElementsByClassName("confirm_holder_stage2")[0].classList.remove("hidden"); holder.getElementsByClassName("confirm_holder_stage2")[0].classList.remove("hidden");
var input = holder.getElementsByTagName("input"); var input = holder.getElementsByTagName("input")[0];
if (input) if (input)
{ {
input[0].focus(); input.focus();
} }
} }