]> source.dussan.org Git - jquery-ui.git/commitdiff
Button: Trim button text before setting as title attribute.
authorMike Hollis <hollis21@gmail.com>
Mon, 25 Jun 2012 13:52:42 +0000 (09:52 -0400)
committerScott González <scott.gonzalez@gmail.com>
Mon, 25 Jun 2012 13:52:42 +0000 (09:52 -0400)
ui/jquery.ui.button.js

index 0c72e9c4bb7a3da6cb2856328eb000a8a3456a31..89f6626f8f78323fb967cd4f11b1dd934c07e97e 100644 (file)
@@ -344,7 +344,7 @@ $.widget( "ui.button", {
                                buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
 
                                if ( !this.hasTitle ) {
-                                       buttonElement.attr( "title", buttonText );
+                                       buttonElement.attr( "title", $.trim( buttonText ) );
                                }
                        }
                } else {