Fix selecting item and scrolling into view when editing a citation
This commit is contained in:
parent
5100cd31ed
commit
4a765aacfa
3 changed files with 6 additions and 5 deletions
|
@ -143,7 +143,7 @@ var Zotero_Citation_Dialog = new function () {
|
|||
// and this fails. It works on subsequent attempts. Since this won't happen in
|
||||
// Standalone, we can ignore.
|
||||
var id = io.citation.citationItems[0].id;
|
||||
var selected = yield itemsView.selectItem(id);
|
||||
let selected = yield collectionsView.selectItem(id);
|
||||
|
||||
for(var box in _preserveData) {
|
||||
var property = _preserveData[box][0];
|
||||
|
@ -256,7 +256,7 @@ var Zotero_Citation_Dialog = new function () {
|
|||
|
||||
// refresh
|
||||
if (itemID) {
|
||||
itemsView.wrappedJSObject.selectItem(itemID);
|
||||
collectionsView.selectItem(itemID);
|
||||
}
|
||||
_updateAccept();
|
||||
_updatePreview();
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
<deck id="zotero-items-pane-content" selectedIndex="0" flex="1">
|
||||
<tree id="zotero-items-tree"
|
||||
enableColumnDrag="true" flex="1" seltype="single"
|
||||
onselect="Zotero_Citation_Dialog.treeItemSelected();">
|
||||
onselect="onItemSelected(); Zotero_Citation_Dialog.treeItemSelected();">
|
||||
<treecols id="zotero-items-columns-header">
|
||||
<treecol
|
||||
id="zotero-items-column-title" primary="true"
|
||||
|
|
|
@ -57,7 +57,7 @@ var doLoad = Zotero.Promise.coroutine(function* () {
|
|||
yield connectionSelectedDeferred.promise;
|
||||
|
||||
if (io.select) {
|
||||
yield itemsView.selectItem(io.select);
|
||||
yield collectionsView.selectItem(io.select);
|
||||
}
|
||||
|
||||
Zotero.updateQuickSearchBox(document);
|
||||
|
@ -99,6 +99,7 @@ var onCollectionSelected = Zotero.Promise.coroutine(function* ()
|
|||
clearItemsPaneMessage();
|
||||
|
||||
connectionSelectedDeferred.resolve();
|
||||
collectionsView.onSelect();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -113,7 +114,7 @@ function onSearch()
|
|||
|
||||
function onItemSelected()
|
||||
{
|
||||
|
||||
itemsView.onSelect();
|
||||
}
|
||||
|
||||
function setItemsPaneMessage(content) {
|
||||
|
|
Loading…
Reference in a new issue