feedTree: amend previous to check that nodes are actually there
This commit is contained in:
parent
277759221c
commit
42e0c7a420
|
@ -276,10 +276,12 @@ define(["dojo/_base/declare", "dojo/dom-construct", "dijit/Tree", "dijit/Menu"],
|
||||||
const node = treeNode.rowNode;
|
const node = treeNode.rowNode;
|
||||||
const tree = this.domNode;
|
const tree = this.domNode;
|
||||||
|
|
||||||
|
if (node && tree) {
|
||||||
// scroll tree to selection if needed
|
// scroll tree to selection if needed
|
||||||
if (node.offsetTop < tree.scrollTop || node.offsetTop > tree.scrollTop + tree.clientHeight) {
|
if (node.offsetTop < tree.scrollTop || node.offsetTop > tree.scrollTop + tree.clientHeight) {
|
||||||
$("feedTree").scrollTop = node.offsetTop;
|
$("feedTree").scrollTop = node.offsetTop;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue