This commit is contained in:
Jon Eugster
2023-09-10 16:15:41 +02:00
parent 87cb299b1f
commit b01dd1de6e
6 changed files with 19 additions and 13 deletions
+5 -1
View File
@@ -335,7 +335,11 @@ export function CommandLineInterface(props: { world: string, level: number, data
// Scroll to the end of the proof if it is updated.
React.useEffect(() => {
proofPanelRef.current?.lastElementChild?.scrollIntoView() //scrollTo(0,0)
if (proof?.length > 1) {
proofPanelRef.current?.lastElementChild?.scrollIntoView() //scrollTo(0,0)
} else {
proofPanelRef.current?.scrollTo(0,0)
}
}, [proof])
// Scroll to element if selection changes