restore functionality that expands linked branches
This commit is contained in:
parent
f192ac2a8e
commit
107a9a4c39
|
@ -168,9 +168,15 @@ function getCurrentlyHighlightedBranch() {
|
||||||
async function highlightCurrentBranch() {
|
async function highlightCurrentBranch() {
|
||||||
let branch = document.getElementById(getCurrentlyHighlightedBranch());
|
let branch = document.getElementById(getCurrentlyHighlightedBranch());
|
||||||
if (branch != null) {
|
if (branch != null) {
|
||||||
expandDetailsRecursively(branch);
|
|
||||||
branch.classList.add("target");
|
|
||||||
branch.scrollIntoView();
|
branch.scrollIntoView();
|
||||||
|
|
||||||
|
// Expand the linked branch so that the person entering the link doesn't have to click on it.
|
||||||
|
expandDetailsRecursively(branch);
|
||||||
|
if (branch.children.length > 0 && branch.children[0].tagName == "DETAILS") {
|
||||||
|
expandDetailsRecursively(branch.children[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
branch.classList.add("target");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue