-
Notifications
You must be signed in to change notification settings - Fork 476
Event Shorthand Syntax Doesn't Appear to be Deprecated. #288
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
Comments
The methods are deprecated and there is a docs ticket at jquery/api.jquery.com#972 . We'd welcome help in the form of PRs to update the docs. |
LOL |
rodrigoprimo
added a commit
to woocommerce/woocommerce
that referenced
this issue
Nov 18, 2020
This commit replaces all instances in WooCommerce codebase (except included third-party libraries) where jQuery.fn.click( handler ) event shorthand was used. This shorthand was deprecated in jQuery 3.3 (see jquery/jquery#3214). The jQuery documentation was not updated yet (see jquery/jquery-migrate#288 and jquery/api.jquery.com#972). jQuery.click() was not deprecated and so it was not replaced.
rodrigoprimo
added a commit
to woocommerce/woocommerce
that referenced
this issue
Nov 18, 2020
This commit replaces all instances in WooCommerce codebase (except included third-party libraries) where jQuery.fn.click( handler ) event shorthand was used. This shorthand was deprecated in jQuery 3.3 (see jquery/jquery#3214). The jQuery documentation was not updated yet (see jquery/jquery-migrate#288 and jquery/api.jquery.com#972). jQuery.click() was not deprecated and so it was not replaced.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm running the Migrate 3.0.1 plug-in and seeing a lot of warnings like this (among others):
Migrate is installed with logging active, version 3.0.1
jQuery.fn.click() event shorthand is deprecated.
jQuery.fn.keypress() event shorthand is deprecated
jQuery.fn.mouseup() event shorthand is deprecated
However, there is no indication on the current documentation page for jQuery that this syntax is deprecated. E.g. https://api.jquery.com/click/
Nor does this shorthand appear anywhere in the Deprecated section of the documentation. https://api.jquery.com/category/deprecated/
The best indication I can find is that this syntax is fully supported by the current version of jQuery 3 and that there are no plans to delete this syntax in future versions of jQuery.
jQuery Migrate should not flag code which does not need to be changed. Doing so makes the job of upgrading code to be jQuery 3 compatible look more arduous than it is, encourages people to perform search/replace operations which may introduce errors, and makes it difficult to trust the other recommendations which are made since every recommended change now needs to be cross-referenced against the documentation.
The text was updated successfully, but these errors were encountered: