selectFeed: scroll feed tree to selected row
This commit is contained in:
parent
da35421cce
commit
3827e5b944
|
@ -270,8 +270,17 @@ define(["dojo/_base/declare", "dojo/dom-construct", "dijit/Tree", "dijit/Menu"],
|
||||||
this.focusNode(treeNode);
|
this.focusNode(treeNode);
|
||||||
|
|
||||||
// focus headlines to route key events there
|
// focus headlines to route key events there
|
||||||
setTimeout(function() {
|
setTimeout(() => {
|
||||||
$("headlines-frame").focus();
|
$("headlines-frame").focus();
|
||||||
|
|
||||||
|
const node = treeNode.rowNode;
|
||||||
|
const tree = this.domNode;
|
||||||
|
|
||||||
|
// scroll tree to selection if needed
|
||||||
|
if (node.offsetTop < tree.scrollTop || node.offsetTop > tree.scrollTop + tree.clientHeight) {
|
||||||
|
$("feedTree").scrollTop = node.offsetTop;
|
||||||
|
}
|
||||||
|
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue