When a jQuery UI dialog opens, it selects one of the buttons and highlights it or sets focus to it etc... How can I stop this behaviour so that none of the buttons are highl
I had this same problem... Trying to set the focus to another element didn't seem to do the trick for me, but blurring focus from the selected element (in the "open" callback) did:
$('#dialog').dialog
({
open: function ()
{
$('#element-that-gets-selected').blur();
}
});
I suppose a way to prevent focus without specifying a specific name would be to use a selector with first, like this:
$('#dialog').dialog
({
open: function ()
{
$(this).find('select, input, textarea').first().blur();
}
});