From 07bf9c25bfff03e440c33723291794cfabb045fd Mon Sep 17 00:00:00 2001 From: Oliver Mesieh Date: Tue, 7 Jul 2026 15:54:12 +0200 Subject: [PATCH 1/3] Fix CP tab crash when expanding a Bard set after a copy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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(). --- .../fieldtypes/bard/BardFieldtype.vue | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/resources/js/components/fieldtypes/bard/BardFieldtype.vue b/resources/js/components/fieldtypes/bard/BardFieldtype.vue index d2933bfe17..c279e58f2e 100644 --- a/resources/js/components/fieldtypes/bard/BardFieldtype.vue +++ b/resources/js/components/fieldtypes/bard/BardFieldtype.vue @@ -633,15 +633,21 @@ export default { }, expandSet(id) { - if (this.config.collapse === 'accordion') { - this.collapsed = Object.keys(this.meta.existing).filter((v) => v !== id); - return; - } + // Defer the reveal by one frame so the nested Bard editor is shown + // after the click, not during it. Revealing a ProseMirror editor in + // the same trusted click as a pending rich-text copy crashes the tab + // on Chrome/Edge >= 148 (a renderer CFI abort). See statamic/cms#14946. + requestAnimationFrame(() => { + if (this.config.collapse === 'accordion') { + this.collapsed = Object.keys(this.meta.existing).filter((v) => v !== id); + return; + } - if (this.collapsed.includes(id)) { - var index = this.collapsed.indexOf(id); - this.collapsed.splice(index, 1); - } + if (this.collapsed.includes(id)) { + var index = this.collapsed.indexOf(id); + this.collapsed.splice(index, 1); + } + }); }, collapseAll() { @@ -649,7 +655,10 @@ export default { }, expandAll() { - this.collapsed = []; + // Defer the reveal one frame — same reason as expandSet() (statamic/cms#14946). + requestAnimationFrame(() => { + this.collapsed = []; + }); }, toggleCollapseSets() { From 23953898ba4674e6ffb730350b5b1b47f4930ad5 Mon Sep 17 00:00:00 2001 From: Oliver Mesieh Date: Tue, 7 Jul 2026 18:01:26 +0200 Subject: [PATCH 2/3] Apply same fix when expanding a Replicator set after a copy --- .../fieldtypes/replicator/Replicator.vue | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/resources/js/components/fieldtypes/replicator/Replicator.vue b/resources/js/components/fieldtypes/replicator/Replicator.vue index 085eafa56f..fb8e761d6b 100644 --- a/resources/js/components/fieldtypes/replicator/Replicator.vue +++ b/resources/js/components/fieldtypes/replicator/Replicator.vue @@ -313,15 +313,21 @@ export default { }, expandSet(id) { - if (this.config.collapse === 'accordion') { - this.collapsed = this.value.map((v) => v._id).filter((v) => v !== id); - return; - } + // Defer the reveal by one frame so a nested Bard editor is shown + // after the click, not during it. Revealing a ProseMirror editor in + // the same trusted click as a pending rich-text copy crashes the tab + // on Chrome/Edge >= 148 (a renderer CFI abort). See statamic/cms#14946. + requestAnimationFrame(() => { + if (this.config.collapse === 'accordion') { + this.collapsed = this.value.map((v) => v._id).filter((v) => v !== id); + return; + } - if (this.collapsed.includes(id)) { - var index = this.collapsed.indexOf(id); - this.collapsed.splice(index, 1); - } + if (this.collapsed.includes(id)) { + var index = this.collapsed.indexOf(id); + this.collapsed.splice(index, 1); + } + }); }, collapseAll() { @@ -329,7 +335,10 @@ export default { }, expandAll() { - this.collapsed = []; + // Defer the reveal one frame — same reason as expandSet() (statamic/cms#14946). + requestAnimationFrame(() => { + this.collapsed = []; + }); }, toggleFullscreen() { From 2da63dfcbb3c113afb342c4fdbb434cfd8f144e0 Mon Sep 17 00:00:00 2001 From: Oliver Mesieh Date: Tue, 7 Jul 2026 18:27:42 +0200 Subject: [PATCH 3/3] Apply same fix when expanding a Group Field --- resources/js/components/fieldtypes/GroupFieldtype.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/resources/js/components/fieldtypes/GroupFieldtype.vue b/resources/js/components/fieldtypes/GroupFieldtype.vue index 883fe337d0..3d4186ed8b 100644 --- a/resources/js/components/fieldtypes/GroupFieldtype.vue +++ b/resources/js/components/fieldtypes/GroupFieldtype.vue @@ -106,7 +106,16 @@ export default { }, toggleCollapsed() { - this.isCollapsed = !this.isCollapsed; + if (! this.isCollapsed) { + this.isCollapsed = true; + return; + } + + // Expanding: defer the reveal by one frame so the nested Bard editor is + // shown after the click, not during it. Revealing a ProseMirror editor in + // the same trusted click as a pending rich-text copy crashes the tab on + // Chrome/Edge >= 148 (a renderer CFI abort). See statamic/cms#14946. + requestAnimationFrame(() => (this.isCollapsed = false)); }, toggleFullScreen() {