Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion aselo-webchat-react-app/src/components/MessageInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
} from './styles/MessageInput.styles';
import { useSanitizer } from '../utils/useSanitizer';
import { selectCurrentLocale } from '../store/config.reducer';
import { useMobileOptimizations } from '../hooks/useMobileOptimizations';

// eslint-disable-next-line sonarjs/cognitive-complexity
export const MessageInput = () => {
Expand Down Expand Up @@ -71,6 +72,7 @@ export const MessageInput = () => {
[conversation],
);
const { onUserInputSubmit } = useSanitizer();
const { isMobileFullscreen } = useMobileOptimizations();

const logger = window.Twilio.getLogger('MessageInput');
const isSubmitDisabled = (!text.trim() && !attachedFiles?.length) || isSending;
Expand Down Expand Up @@ -171,7 +173,7 @@ export const MessageInput = () => {
maxLength={CHAR_LIMIT}
/>
</Box>
{emojiPickerConfig?.enabled && (
{emojiPickerConfig?.enabled && !isMobileFullscreen && (
<Box {...messageOptionContainerStyles}>
<Button
data-test="emoji-picker-button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ import { MessageInput } from '../MessageInput';
import * as genericActions from '../../store/actions/genericActions';
import WebChatLogger from '../../logger';

jest.mock('../../hooks/useMobileOptimizations', () => ({
useMobileOptimizations: jest.fn(() => ({ isMobileFullscreen: false })),
}));

const fileAttachmentConfig = {
enabled: true,
maxFileSize: 16777216,
Expand Down
Loading