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

Chrome - Tes &#xFEFF - Byte Order Mark in Chrome 105 #5141

Open
milapshah15 opened this issue Sep 26, 2022 · 3 comments
Open

Chrome - Tes &#xFEFF - Byte Order Mark in Chrome 105 #5141

milapshah15 opened this issue Sep 26, 2022 · 3 comments

Comments

@milapshah15
Copy link

Description

We have seen an issue after upgrading to Chrome 105 in data-slate-content is adding BOM (Byte order mark), Slate editors are appending these extra characters causing comparisons to fail when we read the text from these fields.

Screenshots

Chrome:

Screen Shot 2022-09-26 at 1 06 57 PM

Mozilla

Screen Shot 2022-09-26 at 1 10 12 PM

Expectation

It should not have any extra character same as what we have seen in the above screenshot for firefox.

Environment

  • "slate": "0.44.10",
  • "slate-react": "0.21.16",
  • Browser: Chrome, Edge
@green-coder
Copy link

Do you know a workaround to get rid of this extra character?

@milapshah15
Copy link
Author

I ended up just stripping them for now. Going through every node and removing extra characters from the text. Check the snippet below. while node is a iterator.

{ object: 'text', leaves: [{text: node.replace(/\uFEFF/gm, '')}] }

@Nantris
Copy link
Contributor

Nantris commented Oct 9, 2022

Did you try the solutions suggested in #5110?

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

No branches or pull requests

3 participants