We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e37ef4d commit 348839eCopy full SHA for 348839e
web_src/js/features/file-fold.js
@@ -7,7 +7,10 @@ import {svg} from '../svg.js';
7
//
8
export function setFileFolding(fileContentBox, foldArrow, newFold) {
9
foldArrow.innerHTML = svg(`octicon-chevron-${newFold ? 'right' : 'down'}`, 18);
10
- fileContentBox.setAttribute('data-folded', newFold);
+ fileContentBox.setAttribute('data-folded', newFold);
11
+ if (newFold && fileContentBox.getBoundingClientRect().top < 0) {
12
+ fileContentBox.scrollIntoView();
13
+ }
14
}
15
16
// Like `setFileFolding`, except that it automatically inverts the current file folding state.
0 commit comments