Lost focus after close dialog.
Erick-BR opened this issue · comments
Erick-BR commented
Hi, javascript "focus()" doesn't work after call zebra dialog as it work with default javascript alert. Its a field valitation in my case and this function is very important. Thank you.
$.Zebra_Dialog('test');
//alert("test");
form.frm_custo_pessoa_pf.focus();
Stefan Gabos commented
Indeed, this doesn't work as the native alerts in the sense that it doesn't "freeze" the browser. Maybe you'll manage to do what you want by using buttons with custom callbacks
Daniel Jäger commented
I think this should work:
new $.Zebra_Dialog('test', {
buttons: [
{caption: 'Ok', callback: function() {
form.frm_custo_pessoa_pf.focus();
}}
]
});