From cae053879e15c46d2bcd1140259b7c1517ad45a7 Mon Sep 17 00:00:00 2001 From: Andy Butland Date: Fri, 8 May 2026 17:33:13 +0200 Subject: [PATCH] Ignore Tiptap no-op transactions in onUpdate to prevent phantom dirty state. --- .../tiptap/components/input-tiptap/input-tiptap.element.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts b/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts index addfe51b6388..35fca74cac4d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts @@ -223,7 +223,10 @@ export class UmbInputTiptapElement extends UmbFormControlMixin { console.error('contentError', [error.message, error.cause]); }, - onUpdate: ({ editor }) => { + onUpdate: ({ editor, transaction }) => { + // Tiptap also fires `update` for no-op transactions (e.g. setEditable), + // which would otherwise dirty the workspace with a phantom change. + if (!transaction.docChanged) return; this.#value = editor.getHTML(); this._runValidators(); this.dispatchEvent(new UmbChangeEvent());