fix(app): scroll to comment on click
This commit is contained in:
parent
d25120680d
commit
2b07291e17
3 changed files with 49 additions and 4 deletions
|
|
@ -238,7 +238,7 @@ export const SessionReview = (props: SessionReviewProps) => {
|
|||
|
||||
const target = ready ? anchor : anchors.get(focus.file)
|
||||
if (!target) {
|
||||
if (attempt >= 24) return
|
||||
if (attempt >= 120) return
|
||||
requestAnimationFrame(() => scrollTo(attempt + 1))
|
||||
return
|
||||
}
|
||||
|
|
@ -250,7 +250,7 @@ export const SessionReview = (props: SessionReviewProps) => {
|
|||
root.scrollTop = Math.max(0, next)
|
||||
|
||||
if (ready) return
|
||||
if (attempt >= 24) return
|
||||
if (attempt >= 120) return
|
||||
requestAnimationFrame(() => scrollTo(attempt + 1))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue