Created by: cvrebert
So as to preserve the existing behavior when running under jQuery 3.
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.
This addresses the only warning that the jQuery Migrate Plugin emitted.
Refs https://github.com/jquery/jquery-migrate/blob/3.0.0/warnings.md#jqmigrate-jqueryfnremoveattr-no-longer-sets-boolean-properties Refs #16834 (closed).
No v4 port is necessary here, since the relevant feature has already been excised from v4's buttons plugin.
CC: @XhmikosR @hnrch02 for review