diff --git a/android/app/src/main/java/com/emergetools/hackernews/features/comments/components/CommentRow.kt b/android/app/src/main/java/com/emergetools/hackernews/features/comments/components/CommentRow.kt index 49d14b43..174d6f16 100644 --- a/android/app/src/main/java/com/emergetools/hackernews/features/comments/components/CommentRow.kt +++ b/android/app/src/main/java/com/emergetools/hackernews/features/comments/components/CommentRow.kt @@ -9,6 +9,7 @@ import androidx.compose.animation.core.tween import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.text.selection.SelectionContainer import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row @@ -126,12 +127,14 @@ fun CommentRow( } } if (state.hidden == HiddenStatus.Displayed) { - Text( - text = state.content.parseAsHtml(), - style = MaterialTheme.typography.labelSmall, - fontWeight = FontWeight.Normal, - color = MaterialTheme.colorScheme.onSurface, - ) + SelectionContainer { + Text( + text = state.content.parseAsHtml(), + style = MaterialTheme.typography.labelSmall, + fontWeight = FontWeight.Normal, + color = MaterialTheme.colorScheme.onSurface, + ) + } } } } diff --git a/ios/HackerNews/Comments/CommentRow.swift b/ios/HackerNews/Comments/CommentRow.swift index d15f87eb..50c04f96 100644 --- a/ios/HackerNews/Comments/CommentRow.swift +++ b/ios/HackerNews/Comments/CommentRow.swift @@ -88,6 +88,7 @@ struct CommentRow: View { Text(state.text.formattedHTML()) .font(theme.commentTextFont) .tint(.accentColor) + .textSelection(.enabled) } .frame(maxWidth: .infinity, alignment: .leading) .padding(EdgeInsets(top: -3, leading: 8, bottom: 8, trailing: 8))