Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7310ddd

Browse files
committed
Fix auto-scrolling too far so content is covered by top bar
1 parent1c08df5 commit7310ddd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

‎frontend/src/book/store.js‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,14 @@ export const setPage = (page_slug) => {
9494
};
9595

9696
constafterSetPage=(pageSlug,state=localState)=>{
97-
scroller.scrollTo(`step-text-${currentStep(state).index}`,{delay:0,duration:0});
97+
setTimeout(()=>
98+
scroller.scrollTo(`step-text-${currentStep(state).index}`,{
99+
delay:0,
100+
duration:0,
101+
offset:-60,
102+
}),
103+
120,
104+
)
98105
updateDatabase({pageSlug});
99106
window.location.hash=pageSlug;
100107
}
@@ -258,6 +265,7 @@ export const scrollToNextStep = () => {
258265
scroller.scrollTo(`step-text-${currentStep().index}`,{
259266
duration:1000,
260267
smooth:true,
268+
offset:-60,
261269
}),
262270
500,
263271
)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp