fix(app): scroll jacking
This commit is contained in:
@@ -16,7 +16,18 @@ import { useFileComponent } from "../context/file"
|
|||||||
import { useI18n } from "../context/i18n"
|
import { useI18n } from "../context/i18n"
|
||||||
import { getDirectory, getFilename } from "@opencode-ai/util/path"
|
import { getDirectory, getFilename } from "@opencode-ai/util/path"
|
||||||
import { checksum } from "@opencode-ai/util/encode"
|
import { checksum } from "@opencode-ai/util/encode"
|
||||||
import { createEffect, createMemo, createSignal, For, Match, onCleanup, Show, Switch, type JSX } from "solid-js"
|
import {
|
||||||
|
createEffect,
|
||||||
|
createMemo,
|
||||||
|
createSignal,
|
||||||
|
For,
|
||||||
|
Match,
|
||||||
|
onCleanup,
|
||||||
|
Show,
|
||||||
|
Switch,
|
||||||
|
untrack,
|
||||||
|
type JSX,
|
||||||
|
} from "solid-js"
|
||||||
import { createStore } from "solid-js/store"
|
import { createStore } from "solid-js/store"
|
||||||
import { type FileContent, type FileDiff } from "@opencode-ai/sdk/v2"
|
import { type FileContent, type FileDiff } from "@opencode-ai/sdk/v2"
|
||||||
import { PreloadMultiFileDiffResult } from "@pierre/diffs/ssr"
|
import { PreloadMultiFileDiffResult } from "@pierre/diffs/ssr"
|
||||||
@@ -442,6 +453,7 @@ export const SessionReview = (props: SessionReviewProps) => {
|
|||||||
const focus = props.focusedComment
|
const focus = props.focusedComment
|
||||||
if (!focus) return
|
if (!focus) return
|
||||||
|
|
||||||
|
untrack(() => {
|
||||||
focusToken++
|
focusToken++
|
||||||
const token = focusToken
|
const token = focusToken
|
||||||
|
|
||||||
@@ -487,6 +499,7 @@ export const SessionReview = (props: SessionReviewProps) => {
|
|||||||
|
|
||||||
requestAnimationFrame(() => props.onFocusedCommentChange?.(null))
|
requestAnimationFrame(() => props.onFocusedCommentChange?.(null))
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
|
||||||
const handleReviewKeyDown = (event: KeyboardEvent) => {
|
const handleReviewKeyDown = (event: KeyboardEvent) => {
|
||||||
if (event.defaultPrevented) return
|
if (event.defaultPrevented) return
|
||||||
|
|||||||
Reference in New Issue
Block a user