From 8dc04dd9b97e244b230a5ac12ba06098792e99c6 Mon Sep 17 00:00:00 2001
From: Ella <4710635+ellatrix@users.noreply.github.com>
Date: Fri, 7 Jul 2023 22:09:38 +0200
Subject: [PATCH] Footnotes: fix lingering format boundary attr (#52439)
---
packages/rich-text/src/to-tree.js | 2 +-
test/e2e/specs/editor/various/footnotes.spec.js | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/packages/rich-text/src/to-tree.js b/packages/rich-text/src/to-tree.js
index 805b539053a578..b390954b796720 100644
--- a/packages/rich-text/src/to-tree.js
+++ b/packages/rich-text/src/to-tree.js
@@ -60,7 +60,7 @@ function fromFormat( {
let elementAttributes = {};
- if ( boundaryClass ) {
+ if ( boundaryClass && isEditableTree ) {
elementAttributes[ 'data-rich-text-format-boundary' ] = 'true';
}
diff --git a/test/e2e/specs/editor/various/footnotes.spec.js b/test/e2e/specs/editor/various/footnotes.spec.js
index 63480bd11521c5..e65eee6d3d08eb 100644
--- a/test/e2e/specs/editor/various/footnotes.spec.js
+++ b/test/e2e/specs/editor/various/footnotes.spec.js
@@ -48,7 +48,7 @@ test.describe( 'Footnotes', () => {
{
name: 'core/paragraph',
attributes: {
- content: `second paragraph*`,
+ content: `second paragraph*`,
},
},
{
@@ -72,13 +72,13 @@ test.describe( 'Footnotes', () => {
{
name: 'core/paragraph',
attributes: {
- content: `first paragraph*`,
+ content: `first paragraph*`,
},
},
{
name: 'core/paragraph',
attributes: {
- content: `second paragraph*`,
+ content: `second paragraph*`,
},
},
{
@@ -106,13 +106,13 @@ test.describe( 'Footnotes', () => {
{
name: 'core/paragraph',
attributes: {
- content: `second paragraph*`,
+ content: `second paragraph*`,
},
},
{
name: 'core/paragraph',
attributes: {
- content: `first paragraph*`,
+ content: `first paragraph*`,
},
},
{
@@ -138,7 +138,7 @@ test.describe( 'Footnotes', () => {
{
name: 'core/paragraph',
attributes: {
- content: `second paragraph*`,
+ content: `second paragraph*`,
},
},
{