Skip to content

Conversation

@bluesnotred
Copy link

Selecting an image and pressing Backspace/Delete throws:

TypeError: Cannot assign to read only property '_cachedNodes' of object '#<_NodeSelection>'

The cached this.#selection.current may be frozen after certain Lexical operations. Using fresh $getSelection() instead fixes this.

Related: facebook/lexical#6290

The cached selection may be frozen, causing '_cachedNodes' read-only error.
Use fresh $getSelection() instead of this.#selection.current.

Related: facebook/lexical#6290
Same frozen selection issue in #withCurrentNode() - use fresh $getSelection().
@bluesnotred
Copy link
Author

Added a second fix in 6fd45b8 - the #withCurrentNode() method in selection.js had the same frozen selection problem, causing errors when using arrow keys to navigate between attachments.

@OtherCroissant
Copy link
Contributor

#494

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