For example, if you do validation and focus() on the client side, it won't work.
ex.
<html>
<head>
<script>
const validate = ()=>{
//some validations...
//focus error item (but no focus)
let errorItem = document.getElementById('test');
errorItem.focus();
event.preventDefault();
}
</script>
</head>
<body>
<form>
<input type="text" id="test" name="test" value="">
<button type="submit" onclick="validate()">send</button>
</form>
</body>
</html>
Line 20312
up.on('up:click', submitButtonSelector, function(event, button) {
return button.focus();
});
seems to be the cause.
As a workaround, we do the following
setTimeout(function(){
errorItem.focus()
,1});
Is there any other workar