-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Feature] Synced PatternsRelated to synced patterns (formerly reusable blocks)Related to synced patterns (formerly reusable blocks)[Priority] HighUsed to indicate top priority items that need quick attentionUsed to indicate top priority items that need quick attention[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Milestone
Description
Issue Overview
If you edit a post using Text Mode, any shared blocks will appear as though they have been deleted when you return to Visual Mode.
Steps to Reproduce (for bugs)
- Create a new post
- Create or insert a Shared Block
- Switch to Text Mode
- Make an edit, e.g. add a line of text
- Return to Visual Mode
Expected Behavior
The Shared Block should render properly in the visual editor.
Current Behavior
The Shared Block appears as though it has been deleted.
Possible Solution
This is because RESET_BLOCKS
is dispatched when PostTextEditor
is blurred. This has the unintended side effect of deleting the block that the Shared Block is referencing.
One solution is to change RESET_BLOCKS
so that it doesn't delete any blocks in blocksByUid
that are referenced by orderedBlocks
or reusableBlocks
.
cc. @aduth
Screenshots / Video
Related Issues and/or PRs
#5228 introduced this bug. I discovered this while debugging #2978 which is vaguely related.
Metadata
Metadata
Assignees
Labels
[Feature] Synced PatternsRelated to synced patterns (formerly reusable blocks)Related to synced patterns (formerly reusable blocks)[Priority] HighUsed to indicate top priority items that need quick attentionUsed to indicate top priority items that need quick attention[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended