Skip to content
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

U4-11253 New Chrome 66 trimStart function is overriding the Umbraco C… #2597

Merged
merged 1 commit into from Apr 20, 2018

Conversation

nul800sebastiaan
Copy link
Member

…ore trimStart polyfill

Prerequisites

  • I have written a descriptive pull-request title
  • I have linked this PR to an issue on the tracker at http://issues.umbraco.org

Description

Re: http://issues.umbraco.org/issue/U4-11253

By ALWAYS overriding the trimStart and trimEnd method we are not affected by the change to Chrome 66 which implements these methods without the ability to remove a specific character.

@robert-cpl robert-cpl merged commit 395575d into dev-v7 Apr 20, 2018
@robert-cpl robert-cpl deleted the temp-U4-11253 branch April 20, 2018 07:39
@JimBobSquarePants
Copy link
Contributor

Noooooooooooooo!!!!!!!! This is such a terrible idea. You’ve just been broken every potential bit of third party code that would rely on the native implementation.

@nul800sebastiaan
Copy link
Member Author

Okay, calm down. We need a temporary fix for now, we're evaluating a long term fix later.

@Shazwazza
Copy link
Contributor

we can make both implementations still work. Based on this https://developers.google.com/web/updates/2018/04/nic66 , all these new methods do is trim whitespace and they don't accept any params. Our methods DO accept params. So all we need to do is:

  • When Extensions.js loads, check if these methods exist, if they do, we store the original function reference but we still replace these methods
  • When these methods are called and there are no parameters specified and we have a reference to the original function, we'll call it without any params

@jesperordrup
Copy link

We need a temporary fix for now, we're evaluating a long term fix later.

We've just discovered a conflict with a third party plugin we use in Umbraco Backends. Its called Small.Chat. WHen we load smallchat then it overrides trimStart and then Umbraco fails.

While I think Small.Chat shouldnt override anything - it shows that there might be something that needs to be fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants