Skip to content

[6.x] Fix CP tab crash when expanding a Bard set after a copy#14951

Open
o1y wants to merge 2 commits into
statamic:6.xfrom
o1y:fix-13385
Open

[6.x] Fix CP tab crash when expanding a Bard set after a copy#14951
o1y wants to merge 2 commits into
statamic:6.xfrom
o1y:fix-13385

Conversation

@o1y

@o1y o1y commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #14946

The chromium render crash ("Aw, Snap") fires when all of these line up in the same click

  1. A rich copy is on the clipboard (text copied from inside a Bard editor).
  2. A hidden Bard editor is revealed (the set's content goes from display:none to visible).
  3. The set's content animates as it appears (the header transition + the fields fading in). This was not there in V5, so this is why this bug was probably not triggering there.

When all three happen inside the one click, Chrome probably trips over its own editing/clipboard code and kills the tab.

In this commit we defer the reveal by one animation frame so the Bard editor is shown just after the click. That moves the work off the click, and the crash can't happen.

@o1y o1y changed the title Fix CP tab crash when expanding a Bard set after a copy [6.x] Fix CP tab crash when expanding a Bard set after a copy Jul 7, 2026
Defer the set reveal by one animation frame so the nested ProseMirror editor doesn't lay out during the trusted-click turn (Chrome ≥148 CFI crash). Covers both reveal paths: expandSet() and expandAll().
@o1y o1y marked this pull request as draft July 7, 2026 15:38
@o1y o1y marked this pull request as ready for review July 7, 2026 16:20
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.

CP crashes the browser when you copy, then expand a Bard-containing Replicator set (Chrome/Edge ≥ 148)

1 participant