Reputation: 17842
Is it possible to have the focus on same button even after losing the focus.
I kept the code for your reference.
OnSuccess is the blur event for the button btnOK.
function OnSuccess() {
document.getElementById('btnOk').focus();
return true;
}
During tab press on the btnOK, It loses the focus.How to stay back the focus in the same control?
Upvotes: 0
Views: 702
Reputation: 12683
Try:
function OnSuccess() {
setTimeout(function(){
document.getElementById('btnOk').focus();
}, 0);
return true;
}
Upvotes: 1