Skip to content

Commit 89723bd

Browse files
committed
fix(prompter): Broken scroll jumping on button press
1 parent 43e25f0 commit 89723bd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/webui/src/client/ui/Prompter/PrompterView.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,10 @@ export class PrompterViewContent extends React.Component<Translated<IProps & ITr
369369
this._lastAnimation = animate(window.scrollY, scrollToPosition, {
370370
duration: 0.4,
371371
ease: 'easeOut',
372-
onUpdate: (latest: number) => window.scrollTo(0, latest),
372+
onUpdate: (latest: number) => window.scrollTo({
373+
top: latest,
374+
behavior: 'instant',
375+
}),
373376
})
374377
}
375378
listAnchorPositions(startY: number, endY: number, sortDirection = 1): [number, Element][] {

0 commit comments

Comments
 (0)