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

Error thrown with Katex library: Cannot resolve a DOM point #4851

Open
antondc opened this issue Feb 23, 2022 · 1 comment · May be fixed by #5407
Open

Error thrown with Katex library: Cannot resolve a DOM point #4851

antondc opened this issue Feb 23, 2022 · 1 comment · May be fixed by #5407
Labels

Comments

@antondc
Copy link

antondc commented Feb 23, 2022

Description
When using Slate and Slate-react along with Katex library —to render math within blocks—, the whole editor breaks when cursor reachs the rendered formyla, throwing an error and breaking the whole editor: Cannot resolve a DOM point from Slate point: {"path":[0,1],"offset":1}

Recording
https://user-images.githubusercontent.com/55709791/155305908-16de0603-3f56-43b6-a9ca-9985e4e447b6.mov

Sandbox
https://codesandbox.io/s/slate-reproductions-forked-xg95mz

Steps
To reproduce the behavior:

  1. Place cursor on the start of the text
  2. Move cursor to the right until you reach the formula
  3. See how editor breaks when cursor reachs formula
  4. Repeat backwards, starting from end of text to start

Expectation
Editor should not fail, or when failing log an error without throwing and crashing whole editor

Environment

  • Slate Version: 0.72.3
  • Operating System: OSX, Ubuntu
  • Browser: Chrome, Firefox and Safari
@antondc antondc added the bug label Feb 23, 2022
@HugoDerigny
Copy link

Any news on this ?

@zbeyens zbeyens linked a pull request Apr 27, 2023 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants