From 21bf23b67df097cd0d40c8a44e582055185ff973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 22 Oct 2025 12:37:13 +0200 Subject: [PATCH] Dictionary: Fix shortcut Ctrl + S not saving dictionary items (#20605) * switched event listener from 'change' to 'input' * Update workspace-view-dictionary-editor.element.ts --- .../workspace-view-dictionary-editor.element.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/dictionary/workspace/views/workspace-view-dictionary-editor.element.ts b/src/Umbraco.Web.UI.Client/src/packages/dictionary/workspace/views/workspace-view-dictionary-editor.element.ts index b987fc3a64..dff606e519 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/dictionary/workspace/views/workspace-view-dictionary-editor.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/dictionary/workspace/views/workspace-view-dictionary-editor.element.ts @@ -1,7 +1,6 @@ import { UMB_DICTIONARY_WORKSPACE_CONTEXT } from '../dictionary-workspace.context-token.js'; import type { UmbDictionaryDetailModel } from '../../types.js'; import type { UUITextareaElement } from '@umbraco-cms/backoffice/external/uui'; -import { UUITextareaEvent } from '@umbraco-cms/backoffice/external/uui'; import { css, html, customElement, state, repeat } from '@umbraco-cms/backoffice/external/lit'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { UmbLanguageCollectionRepository, type UmbLanguageDetailModel } from '@umbraco-cms/backoffice/language'; @@ -72,13 +71,11 @@ export class UmbWorkspaceViewDictionaryEditorElement extends UmbLitElement { } #onTextareaChange(e: Event) { - if (e instanceof UUITextareaEvent) { - const target = e.composedPath()[0] as UUITextareaElement; - const translation = (target.value as string).toString(); - const isoCode = target.getAttribute('name')!; + const target = e.composedPath()[0] as UUITextareaElement; + const translation = (target.value as string).toString(); + const isoCode = target.getAttribute('name')!; - this.#workspaceContext?.setPropertyValue(isoCode, translation); - } + this.#workspaceContext?.setPropertyValue(isoCode, translation); } override render() { @@ -104,7 +101,7 @@ export class UmbWorkspaceViewDictionaryEditorElement extends UmbLitElement { slot="editor" name=${language.unique} label="translation" - @change=${this.#onTextareaChange} + @input=${this.#onTextareaChange} .value=${translation?.translation ?? ''} ?readonly=${this.#isReadOnly(language.unique)}> `;