mirror of https://github.com/vector-im/riot-web
Merge pull request #5037 from matrix-org/t3chguy/room-list/14705
Fix BaseAvatar wrongly using Buttons when it needs notpull/21833/head
commit
ff8f1af01e
|
@ -134,7 +134,7 @@ const BaseAvatar = (props: IProps) => {
|
||||||
aria-hidden="true" />
|
aria-hidden="true" />
|
||||||
);
|
);
|
||||||
|
|
||||||
if (onClick !== null) {
|
if (onClick) {
|
||||||
return (
|
return (
|
||||||
<AccessibleButton
|
<AccessibleButton
|
||||||
{...otherProps}
|
{...otherProps}
|
||||||
|
@ -162,7 +162,7 @@ const BaseAvatar = (props: IProps) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (onClick !== null) {
|
if (onClick) {
|
||||||
return (
|
return (
|
||||||
<AccessibleButton
|
<AccessibleButton
|
||||||
className={classNames("mx_BaseAvatar mx_BaseAvatar_image", className)}
|
className={classNames("mx_BaseAvatar mx_BaseAvatar_image", className)}
|
||||||
|
|
|
@ -205,9 +205,8 @@ describe("<TextualBody />", () => {
|
||||||
expect(content.html()).toBe('<span class="mx_EventTile_body markdown-body" dir="auto">' +
|
expect(content.html()).toBe('<span class="mx_EventTile_body markdown-body" dir="auto">' +
|
||||||
'Hey <span>' +
|
'Hey <span>' +
|
||||||
'<a class="mx_Pill mx_UserPill" title="@user:server">' +
|
'<a class="mx_Pill mx_UserPill" title="@user:server">' +
|
||||||
'<img src="mxc://avatar.url/image.png" style="width: 16px; height: 16px;" ' +
|
'<img class="mx_BaseAvatar mx_BaseAvatar_image" src="mxc://avatar.url/image.png" ' +
|
||||||
'title="@member:domain.bla" alt="" aria-hidden="true" role="button" tabindex="0" ' +
|
'style="width: 16px; height: 16px;" title="@member:domain.bla" alt="" aria-hidden="true">Member</a>' +
|
||||||
'class="mx_AccessibleButton mx_BaseAvatar mx_BaseAvatar_image">Member</a>' +
|
|
||||||
'</span></span>');
|
'</span></span>');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue