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

Removing inline references in Portable Text causes the editor to crash. #7963

Open
dagstuan opened this issue Dec 5, 2024 · 0 comments
Open

Comments

@dagstuan
Copy link

dagstuan commented Dec 5, 2024

When using inline references in portable text. Removing one of them causes the editor to crash when clicking on another one. See attached video recording for a demonstration. If i click a reference, then remove it with [backspace], the editor will crash when I click on the next reference.

Screen.Recording.2024-12-05.at.20.18.20.mov

The error printed is:

Error: Cannot resolve a DOM node from Slate node: {"_key":"void-child","_type":"span","text":"","marks":[]}
    at Object.toDOMNode (http://localhost:3000/_next/static/chunks/node_modules__pnpm_4206e6._.js:36582:19)
    at Object.toDOMPoint (http://localhost:3000/_next/static/chunks/node_modules__pnpm_4206e6._.js:36588:28)
    at Object.toDOMRange (http://localhost:3000/_next/static/chunks/node_modules__pnpm_4206e6._.js:36651:35)
    at Editable.useIsomorphicLayoutEffect.setDomSelection (http://localhost:3000/_next/static/chunks/e430c_slate-react_dist_index_es_ceed2f.js:1754:64)
    at Editable.useIsomorphicLayoutEffect (http://localhost:3000/_next/static/chunks/e430c_slate-react_dist_index_es_ceed2f.js:1772:17)
    at react-stack-bottom-frame (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:12452:22)
    at runWithFiberInDEV (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:631:20)
    at commitHookEffectListMount (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:5821:628)
    at commitHookLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:5809:60)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6153:30)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6152:17)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6228:17)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6152:17)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6194:17)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6152:17)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6152:17)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6152:17)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6228:17)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6152:17)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6228:17)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6152:17)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6152:17)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6152:17)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6152:17)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6194:17)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6194:17)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6228:17)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6152:17)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6152:17)
    at recursivelyTraverseLayoutEffects (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6645:105)
    at commitLayoutEffectOnFiber (http://localhost:3000/_next/static/chunks/2671e_next_dist_compiled_react-dom_478089._.js:6194:17)
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

No branches or pull requests

1 participant