Skip to content

Fix block editor data loss issue when using save and stay inside translation field#27064

Closed
robluton wants to merge 3 commits intomainfrom
robl/cms-1346-blocks-doesnt-save-changes-after-editing
Closed

Fix block editor data loss issue when using save and stay inside translation field#27064
robluton wants to merge 3 commits intomainfrom
robl/cms-1346-blocks-doesnt-save-changes-after-editing

Conversation

@robluton
Copy link
Copy Markdown
Contributor

@robluton robluton commented Apr 7, 2026

Scope

What's changed:

  • Added an early return in the value watcher to skip re-rendering when the editor is in readOnly mode
  • Added test case

Potential Risks / Drawbacks

  • No breaking changes

Tested Scenarios

  • Save and stay within a translation field using the block editor no longer causes data loss

Review Notes / Questions

Checklist

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

Fixes CMS-1346

@robluton robluton requested a review from AlexGaillard as a code owner April 7, 2026 19:57
@linear
Copy link
Copy Markdown

linear Bot commented Apr 7, 2026


try {
const sanitizedValue = sanitizeValue(newVal);
if (editorjsRef.value.readOnly.isEnabled) return;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We already have an early return above on line 134, should be maybe just not double up there?

@AlexGaillard
Copy link
Copy Markdown
Member

Closing this one out as the problem still persists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants