Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
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
Core: Fixes deprecated calls to jQuery trim. Fixes #2327#2328
Uh oh!
There was an error while loading.Please reload this page.
Conversation
n8b left a comment
There was a problem hiding this 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){ | |||
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 | |||
| functiontrim(str){ | |||
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Done.
staabm left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Lgtm - thanks
brighton1101 commentedMay 12, 2020
Arkni left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM, Thanks.
staabm commentedMay 12, 2020
@Arkni could you take care of merging this and tagging a new release? |
Arkni commentedMay 12, 2020
@staabm, I will try my best doing it this night or tomorrow. |
Arkni commentedMay 13, 2020
My machine is behaving strangely and I couldn't run Thank you and sorry for the inconvenience. |
staabm commentedMay 23, 2020
trying to do a release now |
Arkni commentedMay 27, 2020
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 commentedMay 27, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@Arkni no worries. Take your time - there are a lot of things which are more important then this project. Best wishes |
bytestream commentedJun 22, 2020
This doesn't resolve all deprecations. Will send another PR |
bytestream commentedJun 23, 2020
Created#2335 |
Tandulje commentedAug 12, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hi...i'am using jquery -v3.5.1 and jquery.validate -v1.9.2 My code is it gives error 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. |
bytestream commentedAug 12, 2020
@Tandulje please open a new issue, this is nothing to do with this PR |
This fixes the issue with deprecation and adds the polyfill for
String.prototype.trimfor browser support.