Skip to content

Commit 74e7644

Browse files
committed
Remove redundant scrollIntoView from handleKeydown
1 parent 12c4106 commit 74e7644

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/utils/markdown/tabs/tabs-script.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ export const enableTabs = () => {
4545
tab.focus();
4646
tab.click();
4747

48-
// Scroll onto screen in order to avoid jumping page locations
49-
setTimeout(() => {
50-
tab.scrollIntoView &&
51-
tab.scrollIntoView({
52-
behavior: "auto",
53-
block: "center",
54-
inline: "center",
55-
});
56-
}, 0);
48+
// Redundant: Scroll handled by `handleClick` on `tab.click()`
49+
// setTimeout(() => {
50+
// tab.scrollIntoView &&
51+
// tab.scrollIntoView({
52+
// behavior: "auto",
53+
// block: "center",
54+
// inline: "center",
55+
// });
56+
// }, 0);
5757
}
5858
}
5959

0 commit comments

Comments
 (0)