From 54af8ee7c6b10cd6beead400a17246636601ce63 Mon Sep 17 00:00:00 2001 From: yuri Date: Wed, 2 May 2018 11:41:46 +0300 Subject: [PATCH] fix concurrency --- client/src/controller.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/client/src/controller.js b/client/src/controller.js index 646bd99081..731e4487f7 100644 --- a/client/src/controller.js +++ b/client/src/controller.js @@ -32,12 +32,14 @@ Espo.define('controller', [], function () { var Controller = function (params, injections) { - this.initialize(); this.params = params || {}; + + this.baseController = injections.baseController; this.viewFactory = injections.viewFactory; this.modelFactory = injections.modelFactory; this.collectionFactory = injections.collectionFactory; - this.baseController = injections.baseController; + + this.initialize(); this._settings = injections.settings || null; this._user = injections.user || null; @@ -258,6 +260,10 @@ Espo.define('controller', [], function () { master.hideLoadingNotification(); }); + this.listenToOnce(this.baseController, 'action', function () { + main.cancelRender(); + }, this); + if (master.currentViewKey) { this.set('storedScrollTop-' + master.currentViewKey, $(window).scrollTop()); if (this.hasStoredMainView(master.currentViewKey)) {