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

ui: [BUGFIX] Replace all replaceAll with split.join for older browsers without replaceAll #9715

Merged
merged 3 commits into from Feb 11, 2021

Conversation

johncowen
Copy link
Contributor

@johncowen johncowen commented Feb 5, 2021

String.replaceAll is only available in newer browsers (for example after Chrome 85), so here we revert to using split(find).join(replace) instead of replaceAll.

A related CSS problem here was support for defining flex-box on fieldsets in older browsers. As this PR is a bugfix for 'older browsers' we added the fix for that here too.

Previous:

Screenshot 2021-02-05 at 11 09 23

Fixes #9714

Thanks @r3knit !

@johncowen johncowen added type/bug Feature does not function as expected theme/ui Anything related to the UI backport/1.9 labels Feb 5, 2021
@hashicorp-ci
Copy link
Contributor

🤔 Double check that this PR does not require a changelog entry in the .changelog directory. Reference

@vercel vercel bot temporarily deployed to Preview – consul-ui-staging February 5, 2021 11:13 Inactive
@vercel vercel bot temporarily deployed to Preview – consul February 5, 2021 11:13 Inactive
Copy link
Contributor

@kaxcode kaxcode left a comment

Choose a reason for hiding this comment

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

:shipit:

@johncowen johncowen merged commit eda38a0 into master Feb 11, 2021
@johncowen johncowen deleted the ui/bugfix/replace-all branch February 11, 2021 09:49
@hashicorp-ci
Copy link
Contributor

🍒 If backport labels were added before merging, cherry-picking will start automatically.

To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/326469.

@hashicorp-ci
Copy link
Contributor

🍒✅ Cherry pick of commit eda38a0 onto release/1.9.x succeeded!

hashicorp-ci pushed a commit that referenced this pull request Feb 11, 2021
…s without replaceAll (#9715)

* ui: replace all `replaceAll` with split.join

* Use a div instead of fieldset for flex-box reasons
dizzyup pushed a commit that referenced this pull request Apr 21, 2021
…s without replaceAll (#9715)

* ui: replace all `replaceAll` with split.join

* Use a div instead of fieldset for flex-box reasons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/ui Anything related to the UI type/bug Feature does not function as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ui: Chrome 84 and less produces a replaceAll error in web console
3 participants