diff --git a/jqueryui/jqueryui-tests.ts b/jqueryui/jqueryui-tests.ts index 34f1f4b7e..bc84cb475 100644 --- a/jqueryui/jqueryui-tests.ts +++ b/jqueryui/jqueryui-tests.ts @@ -1438,6 +1438,7 @@ function test_dialog() { }); $(".selector").dialog({ autoOpen: false }); $(".selector").dialog({ buttons: { Ok: function () { $(this).dialog("close"); } } }); + $(".selector").dialog({ buttons: [ { text: "Ok", click: function () { $(this).dialog("close"); } } ] } ); $(".selector").dialog({ closeOnEscape: false }); $(".selector").dialog({ closeText: "hide" }); $(".selector").dialog({ dialogClass: "alert" }); diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index d5e60cd0d..a5f77eade 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -86,7 +86,8 @@ declare module JQueryUI { disabled?: boolean; icons?: any; label?: string; - text?: boolean; + text?: string|boolean; + click?: (event?: Event) => void; } interface Button extends Widget, ButtonOptions {