All of the places where I was (successfully) setting jQuery UI Dialog button text have stopped working. The buttons appear and they function correctly however no text is displayed in all browsers tested (IE, Safari, Chrome, Firefox & Opera). Using Chrome's inspector and Firebug it appears that the text is not even set on the button instead of it being a CSS issue).
The only thing which has changed recently is that we have moved to jQuery 1.8.0 with jQuery UI 1.8.22 and are not in a position to downgrade again.
A reduced example can be found on jsFiddle http://jsfiddle.net/F7pGu/
Sample HTML:
<div id="form">
<h1>Blah</h1>
</div>
<button id="array-test">Array Test</button>
<button id="object-test">Object Test</button>
Sample JavaScript:
var $form = $('#form'),
$arrTest = $('#array-test'),
$objTest = $('#object-test');
$arrTest.click(function(){
$form.dialog({
buttons: [
{
text: 'Cancel'
},
{
text: 'Save'
}
]
});
});
$objTest.click(function(){
$form.dialog({
buttons: {
'Cancel': function () {},
'Save': function () {}
}
});
});
I cannot find anything wrong reading the documentation. We always used the object-test method but the documentation now mentions the array-test method instead.