From 1f1613852cb6116cd71a6600d737099fc2d55d2a Mon Sep 17 00:00:00 2001 From: TJ VanToll Date: Mon, 21 May 2012 21:52:48 -0400 Subject: Button: Corrected default label applied to submit buttons. Fixed #8337: Submit inputs don't automatically set label option. --- ui/jquery.ui.button.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/jquery.ui.button.js') diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 772ad4d6f..810191775 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -73,7 +73,7 @@ $.widget( "ui.button", { focusClass = "ui-state-focus"; if ( options.label === null ) { - options.label = this.buttonElement.html(); + options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html()); } this.buttonElement -- cgit v1.2.3