diff --git a/src/script/components/ConversationListCell/ConversationListCell.tsx b/src/script/components/ConversationListCell/ConversationListCell.tsx index 16bd1d76930..b78fc86048a 100644 --- a/src/script/components/ConversationListCell/ConversationListCell.tsx +++ b/src/script/components/ConversationListCell/ConversationListCell.tsx @@ -17,13 +17,7 @@ * */ -import React, { - useEffect, - useRef, - useState, - MouseEvent as ReactMouseEvent, - KeyboardEvent as ReactKeyBoardEvent, -} from 'react'; +import React, {useRef, useState, MouseEvent as ReactMouseEvent, KeyboardEvent as ReactKeyBoardEvent} from 'react'; import {TabIndex} from '@wireapp/react-ui-kit/lib/types/enums'; import cx from 'classnames'; @@ -144,13 +138,6 @@ export const ConversationListCell = ({ } }; - // always focus on the selected conversation when the folder tab loaded - useEffect(() => { - if (isFocused) { - conversationRef.current?.focus(); - } - }, [isFocused]); - return (
  • { if (!conversationsFilter && clickedFilteredConversationId) { const conversationIndex = conversationsToDisplay.findIndex(conv => conv.id === clickedFilteredConversationId); - if (conversationIndex !== -1) { - rowVirtualizer.scrollToIndex(conversationIndex, {align: 'center'}); + rowVirtualizer.scrollToIndex(conversationIndex, {align: 'auto'}); } - // scrollToConversation(clickedFilteredConversationId); setClickedFilteredConversationId(null); } }, [conversationsFilter, clickedFilteredConversationId, conversationsToDisplay]);