From c50b7fc7fd136ee16678c1dc78fa13691d2db28b Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 19 Sep 2021 16:01:12 -0400 Subject: [PATCH] Fixing image in newtab. Fixes #382 --- src/shared/components/post/post-listing.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index 49825b39..b2e1f7e0 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); }