Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 1a9b527

Browse files
committed
Remove code for focusing close button from tac item
See #12410 There's no longer a close button to focus so we instead focus the thread tab. This is done in RightPaneltabs.tsx so we just need to remove this code.
1 parent d2d2e4c commit 1a9b527

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/components/structures/ThreadPanel.tsx

-11
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ import { ButtonEvent } from "../views/elements/AccessibleButton";
3737
import Spinner from "../views/elements/Spinner";
3838
import Heading from "../views/typography/Heading";
3939
import { clearRoomNotification } from "../../utils/notifications";
40-
import { useDispatcher } from "../../hooks/useDispatcher";
41-
import dis from "../../dispatcher/dispatcher";
42-
import { Action } from "../../dispatcher/actions";
4340

4441
interface IProps {
4542
roomId: string;
@@ -259,14 +256,6 @@ const ThreadPanel: React.FC<IProps> = ({ roomId, onClose, permalinkCreator }) =>
259256
}
260257
}, [timelineSet, timelinePanel]);
261258

262-
useDispatcher(dis, (payload) => {
263-
// This actually foucses the close button on the threads panel, as its the only interactive element,
264-
// but at least it puts the user in the right area of the app.
265-
if (payload.action === Action.FocusThreadsPanel) {
266-
closeButonRef.current?.focus();
267-
}
268-
});
269-
270259
return (
271260
<RoomContext.Provider
272261
value={{

0 commit comments

Comments
 (0)