More citation dialog locator fixes

Both typing 123 and typing p.123 adds the locator to the most
recently added node
This commit is contained in:
Adomas Venčkauskas 2020-01-16 11:51:40 +02:00
parent 75465e9096
commit 23550f2951

View file

@ -262,7 +262,7 @@ var Zotero_QuickFormat = new function () {
if(m.index === 0) {
// add to previous cite
var node = _getCurrentEditorTextNode();
var prevNode = node.previousSibling;
var prevNode = locatorLocked ? node.previousSibling : locatorNode;
let citationItem = JSON.parse(prevNode && prevNode.dataset.citationItem || "null");
if (citationItem) {
citationItem.locator = m[2];