Files
apify--crawlee/website/patches/@docusaurus+core+3.6.0.patch
2026-07-13 13:23:39 +08:00

20 lines
925 B
Diff

diff --git a/node_modules/@docusaurus/core/lib/client/ClientLifecyclesDispatcher.js b/node_modules/@docusaurus/core/lib/client/ClientLifecyclesDispatcher.js
index 903f8dc..b6b60bf 100644
--- a/node_modules/@docusaurus/core/lib/client/ClientLifecyclesDispatcher.js
+++ b/node_modules/@docusaurus/core/lib/client/ClientLifecyclesDispatcher.js
@@ -30,9 +30,11 @@ function scrollAfterNavigation({ location, previousLocation, }) {
window.scrollTo(0, 0);
}
else {
- const id = decodeURIComponent(hash.substring(1));
- const element = document.getElementById(id);
- element?.scrollIntoView();
+ setTimeout(() => {
+ const id = decodeURIComponent(hash.substring(1));
+ const element = document.getElementById(id);
+ element?.scrollIntoView();
+ }, 100);
}
}
function ClientLifecyclesDispatcher({ children, location, previousLocation, }) {