From 307da6d3608558b0563130f013c45705092499e7 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sun, 7 Apr 2024 15:55:18 -0600 Subject: [PATCH] Fix "normally hidden" banner --- CHANGELOG.md | 2 ++ .../output/themes/default/assets/typedoc/Application.ts | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41269a14f..a9e68985b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ ### Bug Fixes - Fixed conversion of `NoInfer` missing type parameter reference, #2539. +- Linking to a member on a page no longer incorrectly claims that + "This member is normally hidden due to your filter settings" for every member. ### Thanks! diff --git a/src/lib/output/themes/default/assets/typedoc/Application.ts b/src/lib/output/themes/default/assets/typedoc/Application.ts index 4d1e4a1d8..0406e1d27 100644 --- a/src/lib/output/themes/default/assets/typedoc/Application.ts +++ b/src/lib/output/themes/default/assets/typedoc/Application.ts @@ -42,8 +42,9 @@ export class Application { // We're on a *really* slow network connection and the inline JS // has already made the page display. if (!document.body.style.display) { - this.scrollToHash(); + this.ensureFocusedElementVisible(); this.updateIndexVisibility(); + this.scrollToHash(); } } @@ -67,15 +68,18 @@ export class Application { public showPage() { if (!document.body.style.display) return; + console.log("Show page"); document.body.style.removeProperty("display"); - this.scrollToHash(); + this.ensureFocusedElementVisible(); this.updateIndexVisibility(); + this.scrollToHash(); } public scrollToHash() { // Because we hid the entire page until the navigation loaded or we hit a timeout, // we have to manually resolve the url hash here. if (location.hash) { + console.log("Scorlling"); const reflAnchor = document.getElementById( location.hash.substring(1), );