]> source.dussan.org Git - jquery-ui.git/commitdiff
Button: Create text span in correct document.
authorScott González <scott.gonzalez@gmail.com>
Thu, 20 Oct 2011 17:28:31 +0000 (13:28 -0400)
committerScott González <scott.gonzalez@gmail.com>
Thu, 20 Oct 2011 17:28:31 +0000 (13:28 -0400)
ui/jquery.ui.button.js

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