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
thanks for answers, but it seems to me that the best solution (at least for me, minimal code and no unnecessary use of methods on the DOM) is to define your dialog buttons in an array of object :
buttons: [{
id : "button1",
text : "Button1 text",
title : "tooltip1text1",
tabIndex: -1,
click : clickCallback
},{
id : "button2",
text : "Button2 text",
title : "tooltip1text2",
tabIndex: -1,
click : function(){$(this).dialog("close")}
}]
The important part to prevent your buttons to get focus is : tabIntex:-1
It is also a convenient and readable way to give id to your buttons.