Skip to content
This repository has been archived by the owner on Dec 20, 2018. It is now read-only.

Commit

Permalink
Fix media description in various media modals (mastodon#8678)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored and kyori19 committed Sep 17, 2018
1 parent 1bb744f commit f7dadc3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export default class MediaModal extends ImmutablePureComponent {
startTime={time || 0}
onCloseVideo={onClose}
detailed
description={image.get('description')}
alt={image.get('description')}
key={image.get('url')}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class VideoModal extends ImmutablePureComponent {
startTime={time}
onCloseVideo={onClose}
detailed
description={media.get('description')}
alt={media.get('description')}
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export default class ZoomableImage extends React.PureComponent {
role='presentation'
ref={this.setImageRef}
alt={alt}
title={alt}
src={src}
style={{
transform: `scale(${scale})`,
Expand Down
3 changes: 2 additions & 1 deletion app/javascript/mastodon/features/video/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,12 @@ export default class Video extends React.PureComponent {
}

handleOpenVideo = () => {
const { src, preview, width, height } = this.props;
const { src, preview, width, height, alt } = this.props;
const media = fromJS({
type: 'video',
url: src,
preview_url: preview,
description: alt,
width,
height,
});
Expand Down

0 comments on commit f7dadc3

Please sign in to comment.