# New-topic links with category selected navigate to that category page

**URL:** https://meta.discourse.org/t/new-topic-links-with-category-selected-navigate-to-that-category-page/409528
**Category:** Support
**Created:** [7 augustus 2026 om 14:36 UTC](https://meta.discourse.org/t/new-topic-links-with-category-selected-navigate-to-that-category-page/409528 "2026-08-07T14:36:38Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![simonk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simonk/32/247950_2.png) [@simonk](https://meta.discourse.org/u/simonk)
#### Post date: [7 augustus 2026 om 14:49 UTC](https://meta.discourse.org/t/new-topic-links-with-category-selected-navigate-to-that-category-page/409528/2 "2026-08-07T14:49:41Z")

</div>

This change aborts the navigation if the user was already on Discourse:

> <https://github.com/discourse/discourse/commit/df04a99db932c7afb2ea65ee0dd535f8635e7c61>
>
> Why is this change required?
> 
> The \`/new-topic\` route is a special route which …we use to open the
> composer by loading a URL. By default, the \`new-topic\` route is replaced with the
> \`discovery.latest\` route. On a fresh page load, this makes sense since
> there is no template for the \`new-topic\` route to render. However, this
> behavior does not make sense if we're transition from another route.
> There is no need to replace the current route with the \`discovery.latest\` when all we want
> is to open the composer.
> 
> What does this commit do?
> 
> This commit fixes the undesirable behaviour described above by aborting
> the existing transition to the \`new-topic\` route if \`transition.from\` is
> present. This indicates that we're navigating from an existing route and
> we can just open the composer.

The code has changed since then and now looks like this:

> <https://github.com/discourse/discourse/blob/main/frontend/discourse/app/routes/new-topic.js#L22,L46>

The `if (category) {` block runs **before** the block that checks whether the user was already on discourse, so the navigation proceeds. This feels like the wrong order to me.

---

_[View the full topic](https://meta.discourse.org/t/new-topic-links-with-category-selected-navigate-to-that-category-page/409528)._
