mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Use div instead of span for mx_MImageBody to not violate spec
This commit is contained in:
parent
5f2582395f
commit
4fe0e216d6
@ -16,10 +16,6 @@ limitations under the License.
|
|||||||
|
|
||||||
$timelineImageBorderRadius: 4px;
|
$timelineImageBorderRadius: 4px;
|
||||||
|
|
||||||
.mx_MImageBody {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_MImageBody_thumbnail {
|
.mx_MImageBody_thumbnail {
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
border-radius: $timelineImageBorderRadius;
|
border-radius: $timelineImageBorderRadius;
|
||||||
|
@ -416,10 +416,10 @@ export default class MImageBody extends React.Component<IBodyProps, IState> {
|
|||||||
|
|
||||||
if (this.state.error !== null) {
|
if (this.state.error !== null) {
|
||||||
return (
|
return (
|
||||||
<span className="mx_MImageBody">
|
<div className="mx_MImageBody">
|
||||||
<img src={require("../../../../res/img/warning.svg")} width="16" height="16" />
|
<img src={require("../../../../res/img/warning.svg")} width="16" height="16" />
|
||||||
{ _t("Error decrypting image") }
|
{ _t("Error decrypting image") }
|
||||||
</span>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -434,10 +434,10 @@ export default class MImageBody extends React.Component<IBodyProps, IState> {
|
|||||||
const thumbnail = this.messageContent(contentUrl, thumbUrl, content);
|
const thumbnail = this.messageContent(contentUrl, thumbUrl, content);
|
||||||
const fileBody = this.getFileBody();
|
const fileBody = this.getFileBody();
|
||||||
|
|
||||||
return <span className="mx_MImageBody">
|
return <div className="mx_MImageBody">
|
||||||
{ thumbnail }
|
{ thumbnail }
|
||||||
{ fileBody }
|
{ fileBody }
|
||||||
</span>;
|
</div>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user