]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
button.js: Set disabled property in addition to disabled attribute to preserve behavi...
authorChris Rebert <github@chrisrebert.com>
Tue, 12 Jul 2016 11:04:40 +0000 (04:04 -0700)
committerGitHub <noreply@github.com>
Tue, 12 Jul 2016 11:04:40 +0000 (04:04 -0700)
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]

js/button.js

index dba747c3a40d38130889789ea4f9427755a3ddf8..16e500c8da346eaf91b126a947688281dc278a61 100644 (file)
 
       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)
   }