diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index b30173348..59ae609a7 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -3304,16 +3304,12 @@ var ZoteroPane = new function() var collectionID = false; } - var attachmentItem = Zotero.Attachments.importFromURL(url, false, false, false, collectionID, mimeType, libraryID); - - // importFromURL() doesn't trigger the notifier until - // after download is complete - // - // TODO: add a callback to importFromURL() - setTimeout(function () { - self.selectItem(attachmentItem.id); - }, 1001); - + var attachmentItem = Zotero.Attachments.importFromURL(url, false, + false, false, collectionID, mimeType, libraryID, + function(attachmentItem) { + self.selectItem(attachmentItem.id); + }); + return; } }