From 13f6b9ab2e04d8cff1e9a2140ab941f98c2ff5cb Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Tue, 23 Jan 2024 12:24:49 +0100 Subject: [PATCH] Disable implicit delete of attachments for signature --- wcfsetup/install/files/js/WCF.Attachment.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wcfsetup/install/files/js/WCF.Attachment.js b/wcfsetup/install/files/js/WCF.Attachment.js index 097d768721..1eec070391 100644 --- a/wcfsetup/install/files/js/WCF.Attachment.js +++ b/wcfsetup/install/files/js/WCF.Attachment.js @@ -118,6 +118,11 @@ WCF.Attachment.Upload = WCF.Upload.extend({ { listenToCkeditor }, ) => { const discardAllAttachments = () => { + // Disable the implicit deletion of signature attachments. + if (objectType === "com.woltlab.wcf.user.signature") { + return; + } + this._fileListSelector[0] .querySelectorAll('li:not(.uploadFailed) .jsObjectAction[data-object-action="delete"]') .forEach((button) => { -- 2.20.1