From 23d7d50f374f71efec418276a343e947cb80aea6 Mon Sep 17 00:00:00 2001 From: Daniel DeGroff Date: Wed, 11 Dec 2013 22:53:48 -0600 Subject: Button: Remove `ui-state-active` when disabling buttons Fixes #9602 Closes gh-1151 --- ui/button.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ui/button.js') diff --git a/ui/button.js b/ui/button.js index 247aba6e5..5d502ad51 100644 --- a/ui/button.js +++ b/ui/button.js @@ -260,7 +260,11 @@ $.widget( "ui.button", { this.widget().toggleClass( "ui-state-disabled", !!value ); this.element.prop( "disabled", !!value ); if ( value ) { - this.buttonElement.removeClass( "ui-state-focus" ); + if ( this.type === "checkbox" || this.type === "radio" ) { + this.buttonElement.removeClass( "ui-state-focus" ); + } else { + this.buttonElement.removeClass( "ui-state-focus ui-state-active" ); + } } return; } -- cgit v1.2.3