diff --git a/chrome/content/zotero/elements/attachmentsBox.js b/chrome/content/zotero/elements/attachmentsBox.js index 478c017a8d..82da8df629 100644 --- a/chrome/content/zotero/elements/attachmentsBox.js +++ b/chrome/content/zotero/elements/attachmentsBox.js @@ -96,6 +96,9 @@ } notify(action, type, ids) { + if (ids.includes(this._item?.id)) { + this._resetRenderedFlags(); + } if (!this._item?.isRegularItem()) return; this._updateAttachmentIDs().then(() => { diff --git a/chrome/content/zotero/elements/itemPaneSection.js b/chrome/content/zotero/elements/itemPaneSection.js index b9548c25d1..a8e8d14847 100644 --- a/chrome/content/zotero/elements/itemPaneSection.js +++ b/chrome/content/zotero/elements/itemPaneSection.js @@ -95,11 +95,15 @@ class ItemPaneSectionElementBase extends XULElementBase { return false; } - async _forceRenderAll() { - if (this.hidden) return; + _resetRenderedFlags() { // Clear cached flags to allow re-rendering delete this._syncRenderItemID; delete this._asyncRenderItemID; + } + + async _forceRenderAll() { + if (this.hidden) return; + this._resetRenderedFlags(); if (this.render) this.render(); if (this.asyncRender) await this.asyncRender(); }