Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Core: Fixes deprecated calls to jQuery trim. Fixes #2327#2328

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

brighton1101
Copy link
Contributor

This fixes the issue with deprecation and adds the polyfill forString.prototype.trim for browser support.

Copy link

@n8bn8b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks good to me!

src/core.js Outdated
@@ -1,3 +1,12 @@
// JQuery trim is deprecated, polyfill native js method if not defined
if ( !String.prototype.trim ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

We should not pollute the prototype of builtin objects. Please instead create a local trim-function instead

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Fixed.

src/core.js Outdated
@@ -1,3 +1,10 @@
// JQuery trim is deprecated, provide a trim method based on String.prototype.trim
function trim( str ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Please move the function into a local variable and move it down to the functions where it is used

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Done.

Copy link
Member

@staabmstaabm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Lgtm - thanks

@staabmstaabm requested a review fromArkniMay 7, 2020 19:27
@brighton1101
Copy link
ContributorAuthor

@staabm@Arkni Any updates? We need to update to JQuery 3.5.1 and depend on this change being made

Copy link
Member

@ArkniArkni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM, Thanks.

@staabm
Copy link
Member

@Arkni could you take care of merging this and tagging a new release?

@Arkni
Copy link
Member

@staabm, I will try my best doing it this night or tomorrow.

nebrot reacted with thumbs up emojistaabm reacted with heart emoji

@ArkniArkni merged commitd3748a2 intojquery-validation:masterMay 13, 2020
@Arkni
Copy link
Member

@staabm

My machine is behaving strangely and I couldn't runjquery-release for some reason. It may take me some time to investigate the issue and create a release. Could you please take over the task?

Thank you and sorry for the inconvenience.

@staabmstaabm self-assigned thisMay 14, 2020
@staabm
Copy link
Member

trying to do a release now

Arkni reacted with heart emoji

@Arkni
Copy link
Member

Thanks a lot@staabm for the release :)

(And sorry for not being active. I'm still in a long pause from a lot of things including open source. It may take me a few more months to be able to help triaging issues or review PRs the way I used to.)

@staabm
Copy link
Member

staabm commentedMay 27, 2020
edited
Loading

@Arkni no worries. Take your time - there are a lot of things which are more important then this project.

Best wishes

Arkni reacted with heart emoji

@bytestream
Copy link
Member

This doesn't resolve all deprecations. Will send another PR

staabm reacted with heart emoji

@bytestream
Copy link
Member

Created#2335

@Tandulje
Copy link

Tandulje commentedAug 12, 2020
edited
Loading

Hi...i'am using jquery -v3.5.1 and jquery.validate -v1.9.2

My code is
var settings = $('form').validate().settings;
settings.rules['UserPrincipalName'].required = true;

it gives error
VM155:294 Uncaught TypeError: Cannot set property 'required' of undefined

When i was on older version jquey -v2.1.4 then it was working finebut now not working with jquey- v3.5.1

Please give some solution on it.
I go through lots of link but not getting related to this.
Please let me know how can i fix this issue.

@bytestream
Copy link
Member

@Tandulje please open a new issue, this is nothing to do with this PR

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@staabmstaabmstaabm approved these changes

@n8bn8bn8b approved these changes

@ArkniArkniArkni approved these changes

Assignees

@staabmstaabm

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

6 participants
@brighton1101@staabm@Arkni@bytestream@Tandulje@n8b

[8]ページ先頭

©2009-2025 Movatter.jp