Skip to content
Permalink
Browse files

Dialog: Don't use .attr( props, true ).

  • Loading branch information...
scottgonzalez committed Nov 5, 2012
1 parent 1fe06f0 commit a8de99c791ae24e558920e1756fb7d0bf9dfc166
Showing with 9 additions and 6 deletions.
  1. +9 −6 ui/jquery.ui.dialog.js
@@ -334,15 +334,18 @@ $.widget("ui.dialog", {
}
if ( hasButtons ) {
$.each( buttons, function( name, props ) {
var button, click;
props = $.isFunction( props ) ?
{ click: props, text: name } :
props;
var button = $( "<button type='button'></button>" )
.attr( props, true )
.unbind( "click" )
.click(function() {
props.click.apply( that.element[0], arguments );
})
// Default to a non-submitting button
props = $.extend( { type: "button" }, props );
// Change the context for the click callback to be the main element
click = props.click;
props.click = function() {
click.apply( that.element[0], arguments );
};
button = $( "<button></button>", props )
.appendTo( that.uiButtonSet );
if ( $.fn.button ) {
button.button();

0 comments on commit a8de99c

Please sign in to comment.
You can’t perform that action at this time.