From a6da0bb1ef833bc8ee7a72899e800dabb1b03759 Mon Sep 17 00:00:00 2001 From: Osama Sayegh Date: Wed, 5 Feb 2020 10:35:47 +0300 Subject: [PATCH] UX: Remove subtle render delay with timeline notification button (#8860) --- .../javascripts/discourse/widgets/component-connector.js.es6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/widgets/component-connector.js.es6 b/app/assets/javascripts/discourse/widgets/component-connector.js.es6 index 6221d61f97d..f039d16100d 100644 --- a/app/assets/javascripts/discourse/widgets/component-connector.js.es6 +++ b/app/assets/javascripts/discourse/widgets/component-connector.js.es6 @@ -1,4 +1,4 @@ -import { next } from "@ember/runloop"; +import { scheduleOnce } from "@ember/runloop"; import { setOwner, getOwner } from "@ember/application"; export default class ComponentConnector { @@ -16,7 +16,7 @@ export default class ComponentConnector { const elem = $elem[0]; const { opts, widget, componentName } = this; - next(() => { + scheduleOnce("afterRender", this, () => { const mounted = widget._findView(); const view = widget.register