From ca301277a24ccfc8e529243aed883d8e500a958c Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 19 Sep 2021 16:29:03 -0400 Subject: [PATCH] Fixing image in newtab. Fixes #382 (#430) --- 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 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); } -- 2.44.1