]> 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:29:10 +0000 (13:29 -0400)
(cherry picked from commit c145f1698aa4bfb8b0d1c94e2bfa83399f1de0f3)

ui/jquery.ui.button.js

index 7774ab9378bd7798db53abb66582bedff6de3be7..31074e2e12f976d6007b93f70aedff1bffc25822 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() )