facebook / facebook/lexical

editor.update tags on empty updates persist sometimes

Open
#2,150 0 comments 0 reactions 1 assignee Claimed by @zurfyx View on GitHub
all-platforms-bug core
Dominant language
TypeScript
Stars
23.9k
Forks
2.2k
Avg merge
1d 14h
Merged PRs (30d)
55

Description

This logic defines when to commit or reset the update data:
```
const shouldUpdate =
editor._dirtyType !== NO_DIRTY_NODES ||
editorStateHasDirtySelection(pendingEditorState, editor);
```

**When tags persist**

1. An update that marks a node as dirty
2. An empty update with tags

**When tags do not persist**

1. An empty update with tags
2. An update that marks a node as dirty

Both are batched but they have different behaviors

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.