-
-
Notifications
You must be signed in to change notification settings - Fork 78.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
button.js: Set disabled property in addition to disabled attribute #20278
Conversation
… preserve behavior 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. Refs https://github.com/jquery/jquery-migrate/blob/3.0.0/warnings.md#jqmigrate-jqueryfnremoveattr-no-longer-sets-boolean-properties Refs #16834 [skip validator]
Tests failed. Automated cross-browser testing via Sauce Labs and Travis CI shows that the JavaScript changes in this pull request are: BUSTED Commit: fbeac01 (Please note that this is a fully automated comment.) |
Again, the only failure is due to the recent unrelated Windows Firefox issue: |
Why do we need to keep |
Because jQuery v2's attr behaved like a combination of jQuery 3's attr and prop (at least for the 'disabled' attribute), and users' code might be unwittingly relying upon that behavior. |
All right, LGTM then. |
LGTM |
… preserve behavior under jQuery 3 (twbs#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 twbs#16834 [skip validator]
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.
No v4 port is necessary here, since the relevant feature has already been excised from v4's buttons plugin.
CC: @XhmikosR @hnrch02 for review