Skip to content

Commit

Permalink
fix(ui): Clicking title no longer scroll to top
Browse files Browse the repository at this point in the history
  • Loading branch information
SilentDepth committed Mar 27, 2023
1 parent 856201b commit ef4e3ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const HeaderName = forwardRef(function HeaderName ({ siteTitle, siteDescription,
return (
<p
ref={ref}
className="header-name ml-2 font-medium text-gray-600 dark:text-gray-300 grid-rows-1 grid-cols-1"
className="header-name ml-2 font-medium text-gray-600 dark:text-gray-300 capture-pointer-events grid-rows-1 grid-cols-1"
onClick={onClick}
>
{postTitle && <span className="post-title row-start-1 col-start-1">{postTitle}</span>}
Expand Down
4 changes: 4 additions & 0 deletions styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,7 @@ nav {
@apply bg-day bg-opacity-90 dark:bg-night dark:bg-opacity-90;
}
}

.capture-pointer-events * {
@apply pointer-events-none;
}

0 comments on commit ef4e3ac

Please sign in to comment.