facebook / facebook/lexical

Bug: When a custom text node is deleted, a new text node is inserted

Open
#4,777 4 comments 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
23.9k
Forks
2.2k
Avg merge
1d 14h
Merged PRs (30d)
55

Description

When I delete a custom TextNode, a new Replace TextNode will be inserted. But without replacing text node, no new node will be inserted.

Please Watch the video below

![Kapture 2023-07-14 at 10 51 25](https://github.com/facebook/lexical/assets/39440537/f15ade5f-82c4-479f-a825-88a993babcaa)

Lexical version: 0.9.1 and latest

## The current behavior
This unexpected behavior will trigger my `editor.registerMutationListener(cusTextNode, onChange),
` monitoring and bring unexpected results

## The expected behavior
Uninserted node
Do not insert cusTextNode When a custom node is deleted

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.