[jQuery] Dialog: set focus after 'show' animation

[jQuery] Dialog: set focus after 'show' animation


Hi,
I'm using this code:
var editDialog = $('#dialogEditor').dialog({
modal: true,
autoOpen: false,
position: 'top',
width: dialogWidth || 300,
show: 'fold', // focus is not set when this animation is
enabled
hide: 'fold',
open: function(ev, ui) {
$('#dialogEditor input:first').focus(); // Set focus
}
});
The aim is to set focus to the input element after dialog is open.
It doesn't work when "show" animation is set.
How can I workaround this?
Cheers,
Dmitriy.