Skip to content

Bug: registerUpdateListener gives stale state after clearing formatting #3456

@TrySound

Description

@TrySound

Lexical version: 0.6.4

Steps To Reproduce

  1. make bold non-first word
  2. click on clear
  3. editorState still gives bold format

Link to code example:

https://codesandbox.io/s/mutable-browser-tsk7n2?file=/src/App.tsx

The current behavior

Bold state is not reset after clearing formatting

The expected behavior

Bold state is set to false after clearing formatting

Metadata

Metadata

Assignees

Labels

all-platforms-bugcoreReconciler, DOM, Selection, Node, Events, Composition

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions