diff --git a/chrome/content/zotero/xpcom/server_connector.js b/chrome/content/zotero/xpcom/server_connector.js index b33118f400..efccc61242 100644 --- a/chrome/content/zotero/xpcom/server_connector.js +++ b/chrome/content/zotero/xpcom/server_connector.js @@ -854,7 +854,11 @@ Zotero.Server.Connector.Import.prototype = { } let items = yield translate.translate({ libraryID: library.libraryID, - collections: collection ? [collection.id] : null + collections: collection ? [collection.id] : null, + // Import translation skips selection by default, so force it to occur + saveOptions: { + skipSelect: false + } }); return [201, "application/json", JSON.stringify(items)]; }) diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index ef20c52313..33caa05c4d 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -1299,6 +1299,7 @@ Zotero.Translate.Base.prototype = { } this._collections = options.collections; this._saveAttachments = options.saveAttachments === undefined || options.saveAttachments; + this._saveOptions = options.saveOptions; this._savingAttachments = []; this._savingItems = 0; @@ -2369,9 +2370,12 @@ Zotero.Translate.Import.prototype._prepareTranslation = Zotero.Promise.method(fu collections: this._collections, attachmentMode: Zotero.Translate.ItemSaver[(this._saveAttachments ? "ATTACHMENT_MODE_FILE" : "ATTACHMENT_MODE_IGNORE")], baseURI, - saveOptions: { - skipSelect: true - } + saveOptions: Object.assign( + { + skipSelect: true + }, + this._saveOptions || {} + ) }); this.newItems = []; this.newCollections = [];