From: Dessalines Date: Sun, 19 Sep 2021 20:29:03 +0000 (-0400) Subject: Fixing image in newtab. Fixes #382 (#430) X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%22https:/nerdica.net/%7Biframely.url%7D?a=commitdiff_plain;h=ca301277a24ccfc8e529243aed883d8e500a958c;p=lemmy-ui.git Fixing image in newtab. Fixes #382 (#430) --- diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index 49825b3..b2e1f7e 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -203,16 +203,16 @@ export class PostListing extends Component { if (isImage(post.url)) { return ( -
{this.imgThumb(this.getImageSrc())} -
+ ); } else if (post.thumbnail_url) { return ( @@ -419,12 +419,13 @@ export class PostListing extends Component {
- +
))} @@ -1542,7 +1543,8 @@ export class PostListing extends Component { i.setState(i.state); } - handleImageExpandClick(i: PostListing) { + handleImageExpandClick(i: PostListing, event: any) { + event.preventDefault(); i.state.imageExpanded = !i.state.imageExpanded; i.setState(i.state); }