Don't count missing annotation values as changed if empty string passed
Similar to 0d377a1c4a
, this fixes an unnecessary annotation reload and
loss of unsaved typing on auto-sync immediately after an annotation is
created.
This commit is contained in:
parent
0d377a1c4a
commit
76d8818bed
3 changed files with 28 additions and 1 deletions
|
@ -942,7 +942,12 @@ async function createAnnotation(type, parentItem, options = {}) {
|
|||
if (type == 'highlight') {
|
||||
annotation.annotationText = Zotero.Utilities.randomString();
|
||||
}
|
||||
annotation.annotationComment = Zotero.Utilities.randomString();
|
||||
if (options.comment !== undefined) {
|
||||
annotation.annotationComment = options.comment;
|
||||
}
|
||||
else {
|
||||
annotation.annotationComment = Zotero.Utilities.randomString();
|
||||
}
|
||||
annotation.annotationColor = '#ffd400';
|
||||
var page = Zotero.Utilities.rand(1, 100);
|
||||
annotation.annotationPageLabel = `${page}`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue