Skip to content

Field hooks inside nested lexical blocks do not run #12134

Open
@hjbugajski

Description

@hjbugajski

Describe the Bug

Field hooks inside nested lexical blocks do not run. Structure: Lexical -> Block -> Lexical -> Block.

Screen.Recording.2025-04-16.at.2.06.09.PM.mov

Link to the code that reproduces this issue

https://github.com/hjbugajski/payload-nested-blocks-field-hooks

Reproduction Steps

  1. Clone reproduction repository.
  2. Run docker compose up.
  3. Login with email [email protected] and password password.
  4. Go to Pages.
  5. Create new page.
  6. Add Section block.
  7. Add FieldHook block inside the Section block.
  8. Edit field and click "Save."
  9. Check console log for "FieldHook afterChange," it should not appear.
  10. Add FieldHook block to root content.
  11. Edit field and click "Save."
  12. Check console log for "FieldHook afterChange," it should appear.

Which area(s) are affected? (Select all that apply)

plugin: richtext-lexical

Environment Info

Payload: 3.33.0
Next: 15.3.0
Node: 18

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions