diff --git a/app/assets/javascripts/discourse/views/topic_closing_view.js b/app/assets/javascripts/discourse/views/topic_closing_view.js index 229b36fc7..d876e18ec 100644 --- a/app/assets/javascripts/discourse/views/topic_closing_view.js +++ b/app/assets/javascripts/discourse/views/topic_closing_view.js @@ -10,6 +10,7 @@ Discourse.TopicClosingView = Discourse.View.extend({ elementId: 'topic-closing-info', templateName: 'topic_closing', + delayedRerender: null, contentChanged: function() { this.rerender(); @@ -46,6 +47,12 @@ Discourse.TopicClosingView = Discourse.View.extend({ buffer.push( Em.String.i18n('topic.auto_close_notice', {timeLeft: timeLeftString}) ); buffer.push(''); - this.rerender.bind(this).delay(reRenderDelay); + this.delayedRerender = this.rerender.bind(this).delay(reRenderDelay); + }, + + willDestroyElement: function() { + if( this.delayedRerender ) { + this.delayedRerender.cancel(); + } } }); \ No newline at end of file diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 443c9d9e3..5f58a912b 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -496,7 +496,7 @@ en: jump_reply_down: jump to later reply deleted: "The topic has been deleted" - auto_close_notice: "This topic will automatically close %{timeLeft}" + auto_close_notice: "This topic will automatically close %{timeLeft}." auto_close_title: 'Auto-Close Settings' auto_close_save: "Save" auto_close_cancel: "Cancel"