From e07dfe16d72d89f0314025c3cc6e2c266d61de4f Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 31 Oct 2016 13:19:23 -0400 Subject: [PATCH] FIX: Mentions were refreshing too frequently --- app/assets/javascripts/discourse/components/d-editor.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/components/d-editor.js.es6 b/app/assets/javascripts/discourse/components/d-editor.js.es6 index 0d6b37dcc90..322959422f8 100644 --- a/app/assets/javascripts/discourse/components/d-editor.js.es6 +++ b/app/assets/javascripts/discourse/components/d-editor.js.es6 @@ -267,7 +267,7 @@ export default Ember.Component.extend({ markdownOptions.siteSettings = this.siteSettings; this.set('preview', cook(value)); - Ember.run.next(() => { + Ember.run.scheduleOnce('afterRender', () => { if (this._state !== "inDOM") { return; } const $preview = this.$('.d-editor-preview'); if ($preview.length === 0) return;