(null);
+ const [isTextareaFocused, setIsTextareaFocused] = useState(false);
useEffect(() => {
if (isChatWindowOpen) {
@@ -125,19 +136,27 @@ export default function ChatInput({ conversation, isChatWindowOpen }: ChatInputP
variant="error"
handleClose={() => setFileSendError(null)}
/>
-
-
+
+ {/*
+ Here we add the "isTextareaFocused" class when the user is focused on the TextareaAutosize component.
+ This helps to ensure a consistent appearance across all browsers. Adding padding to the TextareaAutosize
+ component does not work well in Firefox. See: https://github.com/twilio/twilio-video-app-react/issues/498
+ */}
+ setIsTextareaFocused(true)}
+ onBlur={() => setIsTextareaFocused(false)}
+ />
+
{/* Since the file input element is invisible, we can hardcode an empty string as its value.
diff --git a/src/components/ChatWindow/ChatWindow.tsx b/src/components/ChatWindow/ChatWindow.tsx
index 618404bad..6eb0b419c 100644
--- a/src/components/ChatWindow/ChatWindow.tsx
+++ b/src/components/ChatWindow/ChatWindow.tsx
@@ -10,7 +10,7 @@ const useStyles = makeStyles((theme: Theme) =>
createStyles({
chatWindowContainer: {
background: '#FFFFFF',
- zIndex: 100,
+ zIndex: 9,
display: 'flex',
flexDirection: 'column',
borderLeft: '1px solid #E4E7E9',
@@ -20,6 +20,7 @@ const useStyles = makeStyles((theme: Theme) =>
left: 0,
bottom: 0,
right: 0,
+ zIndex: 100,
},
},
hide: {