Unverified Commit 47546ebc authored by Ken Hawkins's avatar Ken Hawkins Committed by GitHub
Browse files

Bug: vf-navigation id selector (#1767)

This fixes a bug if the query selector has numbers or symbols in it. Fix works by wrapping the selector in `''`.
parent 1da21ab7
......@@ -32,9 +32,9 @@ export function vfNavigationOnThisPage() {
if (sectionPositions[i] <= scrollPosition + 70) {
// we activate the section 70 pixels before coming into view, as the sticky bar will cover it
// only add remove the class if there is a new section to activate
if (sectionList.querySelector("a[href*=" + i + "]") != null) {
if (sectionList.querySelector("a[href*='" + i + "']") != null) {
sectionList.querySelector("[aria-selected]").removeAttribute("aria-selected");
sectionList.querySelector("a[href*=" + i + "]").setAttribute("aria-selected", "true");
sectionList.querySelector("a[href*='" + i + "']").setAttribute("aria-selected", "true");
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment