Update bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-form/component.tsx

This commit is contained in:
Ramón Souza 2023-10-23 17:31:41 -03:00 committed by GitHub
parent 65a3e00fbb
commit 5952faefee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -297,7 +297,10 @@ const ChatMessageForm: React.FC<ChatMessageFormProps> = ({
document.addEventListener('click', (event) => {
const chatList = document.getElementById('chat-list');
if (chatList?.contains(event.target as Node)) {
textAreaRef.current?.textarea.focus();
const selection = window.getSelection()?.toString();
if (selection?.length === 0) {
textAreaRef.current?.textarea.focus();
}
}
});