jQuery 4 warning: Number-typed values are deprecated for jQuery.fn.css ("z-index", value)#1960
Closed
nagyimre1980 wants to merge 1 commit into
Closed
jQuery 4 warning: Number-typed values are deprecated for jQuery.fn.css ("z-index", value)#1960nagyimre1980 wants to merge 1 commit into
nagyimre1980 wants to merge 1 commit into
Conversation
jquery-migrate-3.3.2.js: 100 JQMIGRATE: Number-typed values are deprecated for jQuery.fn.css ("z-index", value)
mgol
reviewed
Jul 6, 2021
Member
mgol
left a comment
There was a problem hiding this comment.
Thanks for the PR! I made all Migrate warnings disappear when tested against the latest jQuery & jQuery Migrate versions but I haven't checked with the development jQuery version which is when this warning appears.
That said, I think it's a bug in Migrate. The intention was to not warn against CSS properties on which auto-suffixing was already not happening. We'll need another check in Migrate for this, I think.
Member
|
Migrated to jquery/jquery-migrate#438. |
mgol
added a commit
to jquery/jquery-migrate
that referenced
this pull request
Jul 9, 2021
When used against jQuery Git (future jQuery 4), there were warnings when `.css()` was used against `z-index` with a number value. This didn't make sense as `z-index` never had `px` auto-appended. Commit d25ecd6 was supposed to solve a similar problem but it only worked fine for `3.x`. To make the warning not show up when used with jQuery >=4 we need to fill in `jQuery.cssNumber` with the latest version from jQuery 3.x so that the same properties are allowed to have number values used with `.css()`. Fixes gh-438 Closes gh-439 Ref jquery/jquery-ui#1960
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
jquery-migrate-3.3.2.js: 100 JQMIGRATE: Number-typed values are deprecated for jQuery.fn.css ("z-index", value)