dialog - fixed context of button callbacks should be DOMElement, not jQuery object

This commit is contained in:
Richard Worth
2008-06-08 02:49:54 +00:00
parent 0132665f17
commit fa7409b28b

View File

@@ -106,7 +106,7 @@ $.widget("ui.dialog", {
$.each(options.buttons, function(name, fn) {
$('<button/>')
.text(name)
.click(function() { fn.apply(self.element, arguments); })
.click(function() { fn.apply(self.element[0], arguments); })
.appendTo(uiDialogButtonPane);
});
}