Done! I've changed block: 'nearest' to block: 'start' in ChangesPanelContainer.tsx:168. (#1869)
**What this fixes:** - `block: 'nearest'` only scrolled the minimum distance to make the element visible, which often left users "halfway" through a file - `block: 'start'` aligns the top of the selected diff with the top of the scroll container, ensuring the file header is always visible at the top
This commit is contained in:
committed by
GitHub
parent
6a07e5cc16
commit
078e7fc372
@@ -165,7 +165,7 @@ export function ChangesPanelContainer({
|
||||
const timeoutId = setTimeout(() => {
|
||||
diffRefs.current.get(selectedFilePath)?.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'nearest',
|
||||
block: 'start',
|
||||
});
|
||||
}, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user