From: Chris Rebert Date: Tue, 12 Jul 2016 11:04:40 +0000 (-0700) Subject: button.js: Set disabled property in addition to disabled attribute to preserve behavi... X-Git-Tag: v3.3.7~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e67e3e9b19bde8161526e835c43f2e1b23368499;p=thirdparty%2Fbootstrap.git button.js: Set disabled property in addition to disabled attribute to preserve behavior under jQuery 3 (#20278) This code ought to have used .prop instead of .attr in the first place, but we can't get rid of the attr manipulation now due to backward compatibility constraints. Refs https://github.com/jquery/jquery-migrate/blob/3.0.0/warnings.md#jqmigrate-jqueryfnremoveattr-no-longer-sets-boolean-properties Refs #16834 [skip validator] --- diff --git a/js/button.js b/js/button.js index dba747c3a4..16e500c8da 100644 --- a/js/button.js +++ b/js/button.js @@ -41,10 +41,10 @@ if (state == 'loadingText') { this.isLoading = true - $el.addClass(d).attr(d, d) + $el.addClass(d).attr(d, d).prop(d, true) } else if (this.isLoading) { this.isLoading = false - $el.removeClass(d).removeAttr(d) + $el.removeClass(d).removeAttr(d).prop(d, false) } }, this), 0) }