Uh oh!
There was an error while loading. Please reload this page.
[6.x] Fix nested Bard data loss when reordering sets - #15013
Merged
jasonvarga merged 1 commit intoJul 15, 2026
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#14966.
Reordering sets in a Bard field whose sets contain another Bard field mixes up the set contents and can lose data. The set titles move correctly, but each nested Bard editor keeps showing the content that was previously at its position. As soon as you type in one of those editors, the stale content gets written back to the wrong set and the original content is gone.
This is a regression from #14808, which skips syncing the editor from the
valueprop while the user is focused inside a Bard field:That check matches any
.bard-contentancestor. Since sets are rendered inside the editor's DOM, a nested Bard sits inside the outer Bard's.bard-content, and after dragging a set the focus is inside the outer editor. So every nested editor skipped syncing its shifted value.This PR scopes the guard to the editor's own element instead:
The nested editor's DOM is a descendant of the outer editor's DOM, so focusing a nested set still prevents the outer editor from re-rendering, and the behavior #14808 fixed stays fixed.
Verified both directions against the repro from the issue: reordering sets now keeps content and images with their sets, and typing in a nested set still doesn't clobber the outer editor.
🤖 Generated with Claude Code