Skip to content

Commit

Permalink
fix: entry title can selectable, fixed RSSNext#1428
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <tukon479@gmail.com>
  • Loading branch information
Innei committed Nov 6, 2024
1 parent 4073632 commit 6320c00
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const MarkdownLink = (props: LinkProps) => {
<Tooltip delayDuration={0}>
<TooltipTrigger asChild>
<a
draggable="false"
className="follow-link--underline font-semibold text-foreground no-underline"
href={populatedFullHref}
title={props.title}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,20 @@ export const EntryTitle = ({ entryId, compact }: EntryLinkProps) => {
<a
href={populatedFullHref || void 0}
target="_blank"
draggable="false"
className="-mx-6 block cursor-button rounded-lg p-6 transition-colors hover:bg-theme-item-hover focus-visible:bg-theme-item-hover focus-visible:!outline-none @sm:-mx-3 @sm:p-3"
rel="noreferrer"
onClick={(e) => {
if (window.getSelection()?.toString()) {
e.preventDefault()
}
}}
>
<div className={cn("select-text break-words font-bold", compact ? "text-2xl" : "text-3xl")}>
<EntryTranslation
source={entry.entries.title}
target={translation.data?.title}
className="select-text"
useOverlay
/>
</div>
Expand Down

0 comments on commit 6320c00

Please sign in to comment.