Fix creator overwrite using move option on open field

https://forums.zotero.org/discussion/76423/bug-when-moving-authors-to-top-in-beta
This commit is contained in:
Dan Stillman 2019-03-16 01:53:35 -04:00
parent a11adb737e
commit 9d564f022d

View file

@ -2173,6 +2173,7 @@
<parameter name="dir"/> <parameter name="dir"/>
<body><![CDATA[ <body><![CDATA[
return Zotero.spawn(function* () { return Zotero.spawn(function* () {
yield this.blurOpenField();
if (index == 0 && dir == 'up') { if (index == 0 && dir == 'up') {
Zotero.debug("Can't move up creator 0"); Zotero.debug("Can't move up creator 0");
return; return;
@ -2212,8 +2213,6 @@
this.item.setCreator(index, otherCreator); this.item.setCreator(index, otherCreator);
} }
if (this.saveOnEdit) { if (this.saveOnEdit) {
// See note in transformText()
yield this.blurOpenField();
return this.item.saveTx(); return this.item.saveTx();
} }
}, this); }, this);