Profile page answers and question pages may get mixed up
Description:
The additional content that is loaded with the "load more" button may also load on a question page (the one which shows answers to a question).
Steps to reproduce:
Go to your profile page > scoll until the "load more" button appears > quickly touch the "n answers" button and the "load more" button.
Expected behaviour:
The question page should not load answers from different questions.
Observations:
This issue doesn't happen if you try to reproduce it from the main timeline, it's specific to the profile page.
Test setup:
Samsung galaxy A8 2018 (Android 9) Bromite 96.0
Screenshots:
![]() |
![]() |
|---|
That's an interesting bug, thanks for reporting.
From what I can tell this happens because the HTTP request that is made when clicking the Load more button does not get cancelled on a new page load. When that request completes its response is be appended to the #timeline or #answers div, depending on whether you're in the main timeline or an answers page (including the user profile).
I think it's theoretically possible to encounter this going from an answer page to a user profile, but in practice this very rarely happens due to profile pages being a bit more complex.
I might be able to address this issue once I rework the frontend pagination logic, when I'm porting it away from CoffeeScript.
I think with the Turbo Streams pagination I decreased the likelyhood of this happening quite a lot, this should be fine now.

