From 87eba030b2e34ac6949ea9ae6f127fc03eda144c Mon Sep 17 00:00:00 2001 From: ayana Date: Sat, 21 Jun 2025 10:21:42 -0700 Subject: [PATCH] fix #15140 bug with rich text bullet points --- src/lib/components/common/RichTextInput.svelte | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib/components/common/RichTextInput.svelte b/src/lib/components/common/RichTextInput.svelte index eb7013e5e..8f5693894 100644 --- a/src/lib/components/common/RichTextInput.svelte +++ b/src/lib/components/common/RichTextInput.svelte @@ -59,6 +59,9 @@ export let shiftEnter = false; export let largeTextAsFile = false; + let isUserEditing = false; + let lastSyncedValue = value; + let element; let editor; @@ -256,7 +259,9 @@ } if (value !== newValue) { + isUserEditing = true; value = newValue; + lastSyncedValue = newValue; // check if the node is paragraph as well if (editor.isActive('paragraph')) { @@ -409,7 +414,9 @@ }); $: if (value !== null && editor) { - onValueChange(); + if (!isUserEditing && value !== lastSyncedValue) { + onValueChange(); + } } const onValueChange = () => { @@ -447,6 +454,8 @@ ); // Update editor content selectTemplate(); + lastSyncedValue = value; + isUserEditing = false; } } }