Don
July 15, 2023, 5:05am
1
Hello
If I click an inline link in a topic post and go back to the topic than the posts has incorrect calculated (heigher) height.
Repro:
Go to for example this topic Do we need a help button on the composer? - #13 by dodesz
Click the link on that topic: New User Tips
Go back to that topic with the browser or os native navigation. Or clicking the back link under the post.
On desktop view
On mobile view
Thank you
7 Likes
Canapin
(Coin-coin le Canapin)
July 26, 2023, 10:32am
8
A weird bug I came across. I can repro it, but I don’t know the exact criteria for it to happen.
Open a short(?) topic
Click a notification (or another link?) that makes you go to a long(?) topic
Go back to the previous topic with your browser
The short topic page is too tall, with mostly empty content
I could repro it starting from two short topics, using the same 2nd topic, and have trouble finding the exact context triggering the bug.
It only happens on mobile (Chrome on Android, Chrome Desktop on mobile view).
1 Like
Don
July 26, 2023, 11:55am
9
Hello
I think this is relevant: Clicking on links in posts and go back makes incorrect post height
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
Second topic
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
Now I check the posts in first topic. Here is one.
It gets a calculated min-height
.
As I see this value calculation is find here and use the post-id attribute
buildKey: (attrs) => `post-${attrs.id}`,
services: ["dialog"],
shadowTree: true,
buildAttributes(attrs) {
return attrs.height
? { style: `min-height: ${attrs.height}px` }
: undefined;
},
So let’s check the post-ids and see what’s happened.
In the first topic post the post-id is 12 .
In the second topic we have to find the post-id 13 post. Which is this.
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.
4 Likes
Canapin
(Coin-coin le Canapin)
July 26, 2023, 12:52pm
10
Oh, I could have made a search!
I’ve merged the posts, thanks!
And great detective work as well
4 Likes
Don
August 29, 2024, 6:30am
12
Nope, It seems works great for me.
1 Like