# Change 'reply-to-tab' click behaviour (embedded posts top)

**URL:** https://meta.discourse.org/t/change-reply-to-tab-click-behaviour-embedded-posts-top/261155
**Category:** Development
**Tags:** desktop
**Created:** [April 10, 2023, 7:38am UTC](https://meta.discourse.org/t/change-reply-to-tab-click-behaviour-embedded-posts-top/261155 "2023-04-10T07:38:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [April 10, 2023, 7:38am UTC](https://meta.discourse.org/t/change-reply-to-tab-click-behaviour-embedded-posts-top/261155/1 "2023-04-10T07:38:03Z")

</div>

Hello,

I am working on a theme component and I would like to change the `.reply-to-tab` ![Screenshot 2023-04-10 at 9.38.47](https://global.discourse-cdn.com/meta/original/4X/5/0/1/501461432261bea00ecd1c574e6bfc2ee238cb92.png) click behaviour on desktop. It would works just like on mobile. So not opening the post above the post but jump to the post.

Now I tried with this and it seems working but I am not sure this is the correct implementation. Could someone check this for me? Thank you 🙂

```js
import { withPluginApi } from "discourse/lib/plugin-api";
import DiscourseURL from "discourse/lib/url";

export default {
  name: "reply-to-tab",
  
  initialize(container) {
    withPluginApi("0.8.7", (api) => {
      const site = api.container.lookup("site:main");
      const siteSettings = api.container.lookup('site-settings:main');
      if (!site.mobileView && !siteSettings.enable_filtered_replies_view) {
        api.reopenWidget("post-article", {
          toggleReplyAbove(goToPost = "false") {
            const replyPostNumber = this.attrs.reply_to_post_number;
            const topicUrl = this._getTopicUrl();
            if (topicUrl) {
              DiscourseURL.routeTo(`${topicUrl}/${replyPostNumber}`);
            }
            return Promise.resolve();
          }
        });
      }
    });
  },
};

```

[https://github.com/discourse/discourse/blob/14cf8eacf1a679c08ea7df93aff17949d1a9c4df/app/assets/javascripts/discourse/app/widgets/post.js#L800](https://github.com/discourse/discourse/blob/14cf8eacf1a679c08ea7df93aff17949d1a9c4df/app/assets/javascripts/discourse/app/widgets/post.js#L800)
