Using a B2C custom policy when you press enter on the email verification page in the screenshot below. The default is to click the continue button, this doesnt make a lot of sense on the first step of typing your email and wanting to press the send code button.
How can I change this behavior so that the send verification code button is pressed instead of the continue button?
I tried adding some javascript with an eventlisetner to the text box but this just ends up clicking both the continue button AND the send verification code.
var input = document.getElementById("email");
input.addEventListener("keypress", function (event) {
// If the user presses the "Enter" key on the keyboard
if (event.key === "Enter") {
// Cancel the default action, if needed
event.preventDefault();
// Trigger the button element with a click
document.getElementById("email_ver_but_send").click();
}
});