Skip to content

Commit

Permalink
[article] insert text to clipboard only on article & reply
Browse files Browse the repository at this point in the history
so that the text insertion do not mess up with reply authoring
  • Loading branch information
MrOrz committed Oct 4, 2020
1 parent 3acd6f5 commit 2309b8d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pages/article/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ function ArticlePage() {
{ellipsis(article.text, { wordCount: 100 })} | {t`Cofacts`}
</title>
</Head>
<div className={classes.root} onCopy={handleCopy}>
<div className={classes.root}>
<div className={classes.main}>
<Box
className={classes.card}
Expand Down Expand Up @@ -355,7 +355,7 @@ function ArticlePage() {
)}
</Box>
<Box px={{ xs: '12px', md: '19px' }}>
<Box py={3} overflow="hidden">
<Box py={3} overflow="hidden" onCopy={handleCopy}>
{nl2br(
linkify(text, {
props: {
Expand Down Expand Up @@ -423,6 +423,7 @@ function ArticlePage() {
mt={3}
id="current-replies"
ref={replySectionRef}
onCopy={handleCopy}
>
<h2>{t`${article.articleReplies.length} replies to the message`}</h2>
<Divider classes={{ root: classes.divider }} />
Expand Down

0 comments on commit 2309b8d

Please sign in to comment.