# Clicking on links in posts and go back makes incorrect post height

**URL:** https://meta.discourse.org/t/clicking-on-links-in-posts-and-go-back-makes-incorrect-post-height/271708
**Category:** Bug
**Created:** [July 15, 2023, 5:05am UTC](https://meta.discourse.org/t/clicking-on-links-in-posts-and-go-back-makes-incorrect-post-height/271708 "2023-07-15T05:05:49Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [July 26, 2023, 11:55am UTC](https://meta.discourse.org/t/clicking-on-links-in-posts-and-go-back-makes-incorrect-post-height/271708/9 "2023-07-26T11:55:07Z")

</div>

Hello 👋

I think this is relevant: [Clicking on links in posts and go back makes incorrect post height](https://meta.discourse.org/t/clicking-on-links-in-posts-and-go-back-makes-incorrect-post-height/271708)

I think now I found a pattern for this bug. This is what I am thinking and it’s not sure this is happening. 🙂

When you go back it keeps the previous topic next post(s) height _(I think we can only see it visually if it is taller)_… 🤔

Let me clarify what I am thinking.

I opened two topic to demo it.

[First topic](https://meta.discourse.org/t/do-we-need-a-help-button-on-the-composer/72505)

[Second topic](https://meta.discourse.org/t/new-user-tips/243763)

I go from the first topic to the second topic and back. What happened? The first topic post’s are taller as I show it on the video here [Clicking on links in posts and go back makes incorrect post height](https://meta.discourse.org/t/clicking-on-links-in-posts-and-go-back-makes-incorrect-post-height/271708)

Now I check the posts in first topic. Here is one.

 ![Screenshot 2023-07-26 at 13.13.01](https://global.discourse-cdn.com/meta/original/4X/8/d/7/8d727830b8d48a0db87079803f4c346cbe3dba43.png)

It gets a calculated `min-height`.

 ![Screenshot 2023-07-26 at 13.15.35](https://global.discourse-cdn.com/meta/original/4X/5/9/b/59b50bbff28b252dc4130ef7f5d6ae6172d4e9b2.png)

 ![Screenshot 2023-07-26 at 13.14.27](https://global.discourse-cdn.com/meta/original/4X/5/b/5/5b5157c5be23041f148d8b1401f5b830b9fecc18.png)

As I see this value calculation is find here and use the post-id attribute

> <https://github.com/discourse/discourse/blob/a2eb2b0490cb7948fa968bf7d297879ab16e35ec/app/assets/javascripts/discourse/app/widgets/post.js#L870-L878>

So let’s check the post-ids and see what’s happened.

In the **first topic** post the **post-id is 12**.

 ![Screenshot 2023-07-26 at 13.20.23](https://global.discourse-cdn.com/meta/original/4X/b/0/8/b08e3915140fd1703876c768dac3e9fc29d14148.png)

In the **second topic** we have to find the **post-id 13** post. Which is this.

 ![Screenshot 2023-07-26 at 13.22.43](https://global.discourse-cdn.com/meta/original/4X/0/d/f/0df203e379e816255de4ab214b8f9c21e261c094.png)

This seems the post content height adds the empty space to the first topic 12th post.

As I see this is only happens if I use the slider loader. I am not sure what’s happening _(but maybe because the loader slider is keeps page open while go back to the previous page)_ and starts the min-height calculation on the second topic and when I go back to first topic this calculation added to the actual posts height.

---

_[View the full topic](https://meta.discourse.org/t/clicking-on-links-in-posts-and-go-back-makes-incorrect-post-height/271708)._
