Skip to content

Commit

Permalink
Merge pull request #307 from vordgi/rd-306
Browse files Browse the repository at this point in the history
rd-306 fix scrollIntoViewIfNeeded in firefox
  • Loading branch information
vordgi authored Oct 14, 2024
2 parents 0a41886 + 8e217b3 commit 22ad9cb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/robindoc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "robindoc",
"version": "1.2.3",
"version": "1.2.4",
"description": "",
"main": "./lib/index.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions packages/robindoc/src/assets/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

body {
--header-height: 60px;
position: relative;
padding: 0;
margin: 0;
accent-color: var(--primary600, #ea580c);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const SidebarLink: React.FC<SidebarLinkProps> = ({ link, branch, pathname
if (isTarget) {
scrollTimeoutRef.current = null;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(node as any)?.parentElement?.scrollIntoViewIfNeeded();
(node as any)?.parentElement?.scrollIntoViewIfNeeded?.();
}
}}
>
Expand Down

0 comments on commit 22ad9cb

Please sign in to comment.