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

Prevent Slate errors when adding comments. #4801

Closed
wants to merge 1 commit into from

Conversation

seanparsons
Copy link
Contributor

Problem:
When adding a comment, an exception is thrown from Slate when confirming the comment contents.

Cause:
In the blur handler of ReactEditor in react-slate, there's a lookup which attempts to find the underling DOM node of the text editor in question. For whatever reason (potentially related to the weakmap it uses under the hood of this) it is unable to match the editor and then throws an exception as a result.

Fix:
This doesn't really fix the failure because it seems like that potentially involves fixing some of the internals of slate and it's React integration, but merely hides the exception so that it doesn't get surfaced to the user.

Commit Details:

  • Adds patch that catches exception in the blur handler of slate-react.

- Adds patch that catches exception in the `blur` handler of `slate-react`.
Copy link
Contributor

github-actions bot commented Jan 29, 2024

Try me

Copy link

relativeci bot commented Jan 29, 2024

Job #10082: Bundle Size — 62.39MiB (~+0.01%).

7f1fb63(current) vs 4798d20 master#10074(baseline)

Warning

Bundle contains 66 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
Job #10082
     Baseline
Job #10074
Regression  Initial JS 45.58MiB(~+0.01%) 45.58MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 27.69% 19.94%
No change  Chunks 26 26
No change  Assets 30 30
No change  Modules 4398 4398
No change  Duplicate Modules 476 476
No change  Duplicate Code 30.74% 30.74%
No change  Packages 462 462
No change  Duplicate Packages 65 65
Bundle size by type  Change 1 change Regression 1 regression
                 Current
Job #10082
     Baseline
Job #10074
Regression  JS 62.37MiB (~+0.01%) 62.37MiB
Not changed  HTML 11.54KiB 11.54KiB

View job #10082 reportView fix/prevent-slate-errors branch activityView project dashboard

@seanparsons
Copy link
Contributor Author

A better fix has since been suggested and implemented.

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.

2 participants