Skip to content

[6.x] Fix nested Bard losing characters when typing fast - #15717

Open
o1y wants to merge 2 commits into
statamic:6.xfrom
o1y:bard-set-value-echo
Open

o1y wants to merge 2 commits into
statamic:6.xfrom
o1y:bard-set-value-echo

Conversation

@o1y

@o1y o1y commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #15659

When you type fast in a Bard inside another Bard set, the last few characters can vanish (a short pause is enough). The same problem is for List and Array fields inside a Bard set.

2026-10-24 00 03 25

Fields inside a set write straight into the container. About 150 ms later the outer Bard emits the whole field again, so the nested Bard gets a copy of a value it already had. Its own update is still debounced, so it sees a mismatch and rebuilds, losing the newer typing.

Solution

  • Bard doesn't emit when the container already has the value. The value rebuild from the value watcher now clones the value (like initEditor does).
  • Bard ignores a value identical to the previous one (the same guard which is also there for Tables).

Unlike #15702, where the outer Bard sent back an outdated copy of the set values, the copy here is up to date. But the nested Bard has already moved past it, because its own update is still debounced so it throws away the newer typing.

This branch has not been deployed

No deployments
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.

Cursor jumps to end of text in nested bard fields

1 participant