From 3ca0cff505f6edb7acfdd10fcfb1b0337067f847 Mon Sep 17 00:00:00 2001 From: Maksim Karmatskikh Date: Fri, 15 Sep 2023 12:18:25 +0600 Subject: [PATCH] UBER-872: StyleTextEditor: No update when change text in another text (#3698) Signed-off-by: Maxim Karmatskikh --- .../src/components/StyledTextBox.svelte | 5 ++- .../AttachmentStyleBoxEditor.svelte | 36 ++++++++++--------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/packages/text-editor/src/components/StyledTextBox.svelte b/packages/text-editor/src/components/StyledTextBox.svelte index ad54c96603..0c97bbfd39 100644 --- a/packages/text-editor/src/components/StyledTextBox.svelte +++ b/packages/text-editor/src/components/StyledTextBox.svelte @@ -69,7 +69,10 @@ $: if (oldContent !== content) { oldContent = content - rawValue = content + if (rawValue !== content) { + rawValue = content + textEditor?.setContent(content) + } modified = false } $: if (!modified && rawValue !== content) modified = true diff --git a/plugins/attachment-resources/src/components/AttachmentStyleBoxEditor.svelte b/plugins/attachment-resources/src/components/AttachmentStyleBoxEditor.svelte index c937a1efae..e72b323059 100644 --- a/plugins/attachment-resources/src/components/AttachmentStyleBoxEditor.svelte +++ b/plugins/attachment-resources/src/components/AttachmentStyleBoxEditor.svelte @@ -13,7 +13,7 @@ // limitations under the License. --> -{#key doc?._id} +{#key object?._id}