diff --git a/ts/components/conversation/MessageDetail.tsx b/ts/components/conversation/MessageDetail.tsx index 6df791229..8fd84177a 100644 --- a/ts/components/conversation/MessageDetail.tsx +++ b/ts/components/conversation/MessageDetail.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { ReactChild, ReactNode } from 'react'; -import React, { useEffect, useRef } from 'react'; +import React, { useRef } from 'react'; import classNames from 'classnames'; import { noop } from 'lodash'; @@ -149,20 +149,8 @@ export function MessageDetail({ toggleSafetyNumberModal, viewStory, }: Props): JSX.Element { - const focusRef = useRef(null); const messageContainerRef = useRef(null); - useEffect(() => { - const timer = setTimeout(() => { - // When this component is created, it's initially not part of the DOM, and then it's - // added off-screen and animated in. This ensures that the focus takes. - focusRef.current?.focus(); - }); - return () => { - clearTimeout(timer); - }; - }, []); - function renderAvatar(contact: Contact): JSX.Element { const { acceptedMessageRequest, @@ -327,8 +315,7 @@ export function MessageDetail({ : undefined; return ( - // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex -
+
(null);", "reasonCategory": "usageTrusted", - "updated": "2023-08-17T00:07:01.015Z", - "reasonDetail": "" + "updated": "2023-08-18T19:09:30.283Z" }, { "rule": "React-useRef", @@ -2690,13 +2689,6 @@ "updated": "2023-06-30T22:12:49.259Z", "reasonDetail": "Used for excluding the message metadata from triple-click selections." }, - { - "rule": "React-useRef", - "path": "ts/components/conversation/MessageDetail.tsx", - "line": " const focusRef = useRef(null);", - "reasonCategory": "usageTrusted", - "updated": "2023-04-12T15:51:28.066Z" - }, { "rule": "React-useRef", "path": "ts/components/conversation/MessageDetail.tsx",