Fix #926 again with async DB

This commit is contained in:
Dan Stillman 2016-04-13 01:59:27 -04:00
parent 79504df5f8
commit 045554dd8e

View file

@ -1565,7 +1565,6 @@
<parameter name="textbox"/>
<parameter name="stayFocused"/>
<body><![CDATA[
return Zotero.spawn(function* () {
var comment = false;
var controller = textbox.controller;
if (!controller.matchCount) return;
@ -1630,11 +1629,15 @@
var fields = this.getCreatorFields(row);
fields[creatorField] = creator[creatorField];
fields[otherField] = creator[otherField];
yield this.modifyCreator(creatorIndex, fields);
this.ignoreBlur = true;
this.modifyCreator(creatorIndex, fields)
.then(function () {
this.ignoreBlur = false;
}.bind(this));
}
// Otherwise let the autocomplete popup handle matters
}, this);
]]></body>
</method>
@ -1916,7 +1919,7 @@
// a refresh), close it manually
if (textbox && textbox.parentNode) {
elem = this.createValueElement(
this.item.getField(fieldName),
newVal,
fieldName,
tabindex
);