Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Scrollable report message #26853

Merged
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { IMessage } from '@rocket.chat/core-typings';
import { css } from '@rocket.chat/css-in-js';
import { TextAreaInput, FieldGroup, Field, Box } from '@rocket.chat/fuselage';
import { useToastMessageDispatch, useTranslation, useMethod } from '@rocket.chat/ui-contexts';
import React, { ReactElement } from 'react';
Expand All @@ -16,6 +17,10 @@ type ReportMessageModalProps = {
messageId: IMessage['_id'];
};

const wordBreak = css`
word-break: break-word;
`;

const ReportMessageModal = ({ messageText, messageId, onClose }: ReportMessageModalProps): ReactElement => {
const t = useTranslation();
const {
Expand Down Expand Up @@ -46,7 +51,7 @@ const ReportMessageModal = ({ messageText, messageId, onClose }: ReportMessageMo
onConfirm={handleSubmit(handleReportMessage)}
confirmText={t('Report_exclamation_mark')}
>
<Box mbe='x24'>{messageText}</Box>
<Box className={wordBreak}>{messageText}</Box>
dougfabris marked this conversation as resolved.
Show resolved Hide resolved
<FieldGroup>
<Field>
<Field.Row>
Expand Down