Skip to content

Commit 38896e2

Browse files
authored
Patch patching (#5197)
* reduce time to scroll * remove smooth scroll * create new patch file
1 parent 3a5d84c commit 38896e2

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

patches/@docusaurus+core+2.4.0.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/node_modules/@docusaurus/core/lib/client/ClientLifecyclesDispatcher.js b/node_modules/@docusaurus/core/lib/client/ClientLifecyclesDispatcher.js
2-
index 062d7c1..ebb4a89 100644
2+
index 062d7c1..8c8f1ea 100644
33
--- a/node_modules/@docusaurus/core/lib/client/ClientLifecyclesDispatcher.js
44
+++ b/node_modules/@docusaurus/core/lib/client/ClientLifecyclesDispatcher.js
55
@@ -16,7 +16,19 @@ export function dispatchLifecycleAction(lifecycleAction, ...args) {
@@ -18,7 +18,7 @@ index 062d7c1..ebb4a89 100644
1818
+ if(!isElementInView(element)) {
1919
+ element?.scrollIntoView({ behavior: 'instant'});
2020
+ }
21-
+ }, 1000)
21+
+ }, 250)
2222
+ return; // no previous location so don't continue
2323
}
2424
const samePathname = location.pathname === previousLocation.pathname;
@@ -41,7 +41,7 @@ index 062d7c1..ebb4a89 100644
4141
+ if(!isElementInView(element)) {
4242
+ element?.scrollIntoView({ behavior: 'instant'});
4343
+ }
44-
+ }, 1000)
44+
+ }, 250)
4545
}
4646
}
4747
function ClientLifecyclesDispatcher({ children, location, previousLocation, }) {

src/css/custom.scss

-4
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,6 @@ html[data-theme='dark'] {
138138
--ifm-toc-border-color: var(--ifm-color-gray-900);
139139
}
140140

141-
html {
142-
scroll-behavior: smooth;
143-
}
144-
145141
/* prevent fonts from looking chunky, esp in Firefox */
146142
body {
147143
-webkit-font-smoothing: antialiased;

0 commit comments

Comments
 (0)