From: Cyperghost Date: Tue, 23 Jan 2024 11:24:49 +0000 (+0100) Subject: Disable implicit delete of attachments for signature X-Git-Tag: 6.0.7_dev_1~5^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=13f6b9ab2e04d8cff1e9a2140ab941f98c2ff5cb;p=GitHub%2FWoltLab%2FWCF.git Disable implicit delete of attachments for signature --- 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) => {