From ec8d322f231d8d0f9c8398acd75ca4596cb133c9 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 6 Apr 2023 16:18:03 +0200 Subject: [PATCH] Fix the position of the error message for replies Fixes #5401 --- ts/WoltLabSuite/Core/Ui/Message/Reply.ts | 4 ++-- .../install/files/js/WoltLabSuite/Core/Ui/Message/Reply.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ts/WoltLabSuite/Core/Ui/Message/Reply.ts b/ts/WoltLabSuite/Core/Ui/Message/Reply.ts index f195f438cb..e8a915958d 100644 --- a/ts/WoltLabSuite/Core/Ui/Message/Reply.ts +++ b/ts/WoltLabSuite/Core/Ui/Message/Reply.ts @@ -216,7 +216,7 @@ class UiMessageReply { // check if editor contains actual content const message = this._getCKEditor().getHtml(); if (message === "") { - this.throwError(this._textarea, Language.get("wcf.global.form.error.empty")); + this.throwError(this._getCKEditor().element, Language.get("wcf.global.form.error.empty")); return false; } @@ -287,7 +287,7 @@ class UiMessageReply { EventHandler.fire("com.woltlab.wcf.ckeditor5", "handleError_text", parameters); if (!parameters.cancel) { - this.throwError(this._textarea, data.returnValues.realErrorMessage); + this.throwError(this._getCKEditor().element, data.returnValues.realErrorMessage); } } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/Reply.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/Reply.js index eb80e1f046..cb9030319b 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/Reply.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/Reply.js @@ -162,7 +162,7 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Core", "../../Event/ // check if editor contains actual content const message = this._getCKEditor().getHtml(); if (message === "") { - this.throwError(this._textarea, Language.get("wcf.global.form.error.empty")); + this.throwError(this._getCKEditor().element, Language.get("wcf.global.form.error.empty")); return false; } const data = { @@ -222,7 +222,7 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Core", "../../Event/ }; EventHandler.fire("com.woltlab.wcf.ckeditor5", "handleError_text", parameters); if (!parameters.cancel) { - this.throwError(this._textarea, data.returnValues.realErrorMessage); + this.throwError(this._getCKEditor().element, data.returnValues.realErrorMessage); } } /** -- 2.20.1