User AlexVoss reported an issue where anchor links to headings function correctly when opened in a new tab or email notification but fail within the same topic, jumping to the top instead. They provided an example topic on try.discourse.org and noted a similar past discussion. Moin suggested a related bug regarding anchors across posts, but AlexVoss clarified the issue persists across multiple environments (try, meta, and self-hosted). RGJ confirmed the reproduction and suspected Ember routing as the cause. The topic was moved to the Bug category. Finally, renato confirmed the issue was resolved by PR #38368 and scheduled the topic for closure.
I am having problems creating deep links to headings in posts. They work when I open them in a new browser tab or window but in the post itself or in replies they do not. I get to the top of the page when I click them.
To help with reproducing this, I created an example topic on try.discourse.org - but I realize this will go away in a few hours, so will to try to reproduce this here in a moment.
Ah, sorry. By “outside” in the title I meant that they work from, say, a notification email. Then I realized they also work when opening a new tab or window. You can see this with the link in my first reply. Clicking on it while already on the page gets to the top of the topic. If you open it in a new tab, it opens with the heading at the top as expected.
As to the previous bug report: unfortunately, none of the links in this work now. Also, it is from 2022 - this is not the kind of edge case bug that goes unfixed for that long?
I hope I am not holding the wrong end of the stick here. I was able to reproduce the problem on try.discourse.org, on meta.discourse.org as well as our own hosted forum.