feedTree: amend previous to check that nodes are actually there (2)
This commit is contained in:
parent
42e0c7a420
commit
c7c9c5fb0a
|
@ -273,13 +273,15 @@ define(["dojo/_base/declare", "dojo/dom-construct", "dijit/Tree", "dijit/Menu"],
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
$("headlines-frame").focus();
|
$("headlines-frame").focus();
|
||||||
|
|
||||||
const node = treeNode.rowNode;
|
if (treeNode) {
|
||||||
const tree = this.domNode;
|
const node = treeNode.rowNode;
|
||||||
|
const tree = this.domNode;
|
||||||
|
|
||||||
if (node && tree) {
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue