Skip to content

Fix block editor readOnly toggle race condition#26640

Merged
AlexGaillard merged 4 commits intomainfrom
florian/cms-1809-block-editor-field-content-not-showingnot-editable
Feb 12, 2026
Merged

Fix block editor readOnly toggle race condition#26640
AlexGaillard merged 4 commits intomainfrom
florian/cms-1809-block-editor-field-content-not-showingnot-editable

Conversation

@formfcw
Copy link
Contributor

@formfcw formfcw commented Feb 12, 2026

Scope

What's changed:

  • Defer setting readOnly via await nextTick() so it fires after the value watcher's render() when both props change in the same tick

Potential Risks / Drawbacks

  • If the root cause is a different one than the DOM updates, nextTick might not be the best solution.

Tested Scenarios

  • Opening items with a block editor in the item view and in the relational drawer and verifying the content appears
  • Throttled network speed

Review Notes / Questions

  • Without the fix, the disabled watcher sets the editor to disabled before the value watcher starts render(), causing EditorJS to silently drop content

Checklist

  • Added or updated tests
  • Documentation PR created here or not required
  • OpenAPI package PR created here or not required

Fixes #26635

@linear
Copy link

linear bot commented Feb 12, 2026

Copy link
Member

@AlexGaillard AlexGaillard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆒🫘

@AlexGaillard AlexGaillard enabled auto-merge (squash) February 12, 2026 17:02
@AlexGaillard AlexGaillard merged commit 58d5eb3 into main Feb 12, 2026
70 checks passed
@AlexGaillard AlexGaillard deleted the florian/cms-1809-block-editor-field-content-not-showingnot-editable branch February 12, 2026 17:13
@github-actions github-actions bot added this to the Next Release milestone Feb 12, 2026
AlexGaillard added a commit that referenced this pull request Feb 18, 2026
* fix: ensure EditorJS readOnly state updates correctly after initialization

* add test

* add changset

---------

Co-authored-by: Alex Gaillard <[email protected]>
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.

Block editor field content not showing/not editable

2 participants