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:
This change aborts the navigation if the user was already on Discourse:
The code has changed since then and now looks like this:
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.