# 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:** [August 7, 2026, 2:36pm 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:** 2
**Page:** 1

<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: [August 7, 2026, 2:36pm UTC](https://meta.discourse.org/t/new-topic-links-with-category-selected-navigate-to-that-category-page/409528/1 "2026-08-07T14:36:38Z")

</div>

Continuing the discussion from [Creating a link to start a new topic with pre-filled information](https://meta.discourse.org/t/creating-a-link-to-start-a-new-topic-with-pre-filled-information/28074):

I’m not sure if this is a bug or a feature, but if the `new-topic` link includes a `category` or `category_id` parameter, clicking the link takes you to that category before opening the composer. For example, clicking this link takes you to the Support category before opening the composer:

[https://meta.discourse.org/new-topic?title=topic%20title&category=Support](https://meta.discourse.org/new-topic?title=topic%20title&category=Support)

I would prefer that Discourse did not navigate away from the current page. Is there any way to achieve that?

---

<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: [August 7, 2026, 2:49pm 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.
