mirror of
https://github.com/zotero/zotero.git
synced 2026-09-10 22:41:08 +00:00
Fix annotations not appearing when imported while reader is opening
Fixes https://forums.zotero.org/discussion/133270/bug-embedded-pdf-annotations-and-highlights-fail-to-render-in-zotero-reader
(cherry picked from commit db1216d3e2)
This commit is contained in:
parent
16a79acf7c
commit
e01e6ef9f5
1 changed files with 5 additions and 1 deletions
|
|
@ -740,11 +740,15 @@ class ReaderInstance {
|
|||
}
|
||||
}
|
||||
if (annotations.length) {
|
||||
// Annotations can be added before the reader finishes initializing -- e.g., when
|
||||
// embedded annotations are imported right after opening a newly added file
|
||||
await this._initPromise;
|
||||
this._internalReader.setAnnotations(Components.utils.cloneInto(annotations, this._iframeWindow));
|
||||
}
|
||||
}
|
||||
|
||||
unsetAnnotations(keys) {
|
||||
async unsetAnnotations(keys) {
|
||||
await this._initPromise;
|
||||
this._internalReader.unsetAnnotations(Components.utils.cloneInto(keys, this._iframeWindow));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue