diff --git a/chrome/content/zotero/bindings/noteeditor.xml b/chrome/content/zotero/bindings/noteeditor.xml index e09e34d2b6..36ad879fbc 100644 --- a/chrome/content/zotero/bindings/noteeditor.xml +++ b/chrome/content/zotero/bindings/noteeditor.xml @@ -103,6 +103,7 @@ popup: document.getAnonymousElementByAttribute(this, 'anonid', 'editor-menu'), onNavigate: this._navigateHandler, readOnly: !this.editable, + disableUI: this.mode == 'merge', onReturn: this._returnHandler, placeholder: this.placeholder }); diff --git a/chrome/content/zotero/xpcom/editorInstance.js b/chrome/content/zotero/xpcom/editorInstance.js index dcb60b9110..9781fdc8f6 100644 --- a/chrome/content/zotero/xpcom/editorInstance.js +++ b/chrome/content/zotero/xpcom/editorInstance.js @@ -45,6 +45,7 @@ class EditorInstance { this.onNavigate = options.onNavigate; this._item = options.item; this._readOnly = options.readOnly; + this._disableUI = options.disableUI; this._onReturn = options.onReturn; this._iframeWindow = options.iframeWindow; this._popup = options.popup; @@ -79,6 +80,7 @@ class EditorInstance { action: 'init', value: this._state || this._item.note, readOnly: this._readOnly, + disableUI: this._disableUI, enableReturnButton: !!this._onReturn, placeholder: options.placeholder, dir: Zotero.dir, @@ -526,7 +528,11 @@ class EditorInstance { } } // Make sure attachment key belongs to the actual parent note, - // otherwise it would be a security risk + // otherwise it would be a security risk. + // TODO: Figure out what to do with images not being + // displayed in merge dialog because of this, + // although another reason is because items + // are synced before image attachments else if(item.parentID === this._item.id) { let src = await this._getDataURL(item); this._postMessage({ action: 'notifyProvider', id, type, data: { src } });