Zendesk Button Not Updating Correctly on Topic Change Without Page Refresh

It may because it’s not detecting the page change. This is likely due to how the frontend framework (probably Ember.js, since Discourse uses it) handles component rendering during navigation.

You can add a listener for route changes, something similar to this:


export default Component.extend({
  router: service(),

  didInsertElement() {
    this._super(...arguments);

    this.router.on('routeDidChange', () => {
      this.refreshZendeskButton();
    });
  },

  willDestroyElement() {
    this._super(...arguments);

    this.router.off('routeDidChange', this.refreshZendeskButton);
  },
});