Fix space topic jumping on hover/focus (#12377)

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2024-03-26 16:39:31 +00:00
committed by GitHub
parent ddadbf64fe
commit de154ffba9
+2 -4
View File
@@ -36,7 +36,7 @@ interface IProps extends React.HTMLProps<HTMLDivElement> {
room: Room; room: Room;
} }
export default function RoomTopic({ room, ...props }: IProps): JSX.Element { export default function RoomTopic({ room, className, ...props }: IProps): JSX.Element {
const client = useContext(MatrixClientContext); const client = useContext(MatrixClientContext);
const ref = useRef<HTMLDivElement>(null); const ref = useRef<HTMLDivElement>(null);
@@ -110,15 +110,13 @@ export default function RoomTopic({ room, ...props }: IProps): JSX.Element {
} }
}); });
const className = classNames(props.className, "mx_RoomTopic");
return ( return (
<TooltipTarget <TooltipTarget
{...props} {...props}
ref={ref} ref={ref}
onClick={onClick} onClick={onClick}
dir="auto" dir="auto"
tooltipTargetClassName={className} tooltipTargetClassName={classNames(className, "mx_RoomTopic")}
label={_t("room|read_topic")} label={_t("room|read_topic")}
alignment={Alignment.Bottom} alignment={Alignment.Bottom}
ignoreHover={ignoreHover} ignoreHover={ignoreHover}