Button: Create text span in correct document.

(cherry picked from commit c145f1698a)
This commit is contained in:
Scott González 2011-10-20 13:28:31 -04:00
parent eee4db7866
commit 39e75ade1d

View File

@ -319,7 +319,7 @@ $.widget( "ui.button", {
return; return;
} }
var buttonElement = this.buttonElement.removeClass( typeClasses ), var buttonElement = this.buttonElement.removeClass( typeClasses ),
buttonText = $( "<span></span>" ) buttonText = $( "<span></span>", this.element[0].ownerDocument )
.addClass( "ui-button-text" ) .addClass( "ui-button-text" )
.html( this.options.label ) .html( this.options.label )
.appendTo( buttonElement.empty() ) .appendTo( buttonElement.empty() )