From: Alexander Ebert Date: Mon, 20 Nov 2023 17:06:58 +0000 (+0100) Subject: Refresh the stored value when changing the language X-Git-Tag: 6.0.3_dev_1~17 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3859b5e61472f2d2585bf1fcd5b9eade4690b660;p=GitHub%2FWoltLab%2FWCF.git Refresh the stored value when changing the language --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Language/Input.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Language/Input.js index 5e2c1961db..d06721abce 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Language/Input.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Language/Input.js @@ -130,6 +130,10 @@ define(["require", "exports", "tslib", "../Dom/Util", "../Language", "../Ui/Drop if (data.languageId !== languageId) { const values = _values.get(elementId); if (data.languageId) { + const beforeSelect = data.callbacks.get("beforeSelect"); + if (beforeSelect) { + beforeSelect(data.element); + } values.set(data.languageId, data.element.value); } if (languageId === 0) { diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Language/Text.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Language/Text.js index 7facfc3782..f63c62cac4 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Language/Text.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Language/Text.js @@ -33,6 +33,8 @@ define(["require", "exports", "tslib", "./Input", "../Component/Ckeditor"], func LanguageInput.init(elementId, values, availableLanguages, forceSelection); LanguageInput.registerCallback(elementId, "select", callbackSelect); LanguageInput.registerCallback(elementId, "submit", callbackSubmit); + // CKEditor does not permanently mirror the contents to the