From a79dcf69b260f2690e49f1fbe1ce69d0bf3324a2 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Thu, 7 May 2015 15:41:04 +0930 Subject: [PATCH] Work around Mithril bug --- framework/core/js/bower.json | 3 ++- framework/core/js/forum/src/components/composer.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/core/js/bower.json b/framework/core/js/bower.json index 68cb96cc3..9c3b50c07 100644 --- a/framework/core/js/bower.json +++ b/framework/core/js/bower.json @@ -1,4 +1,5 @@ { + "name": "flarum", "dependencies": { "jquery": "2.1.3", "jquery.hotkeys": "jeresig/jquery.hotkeys#0.2.0", @@ -6,7 +7,7 @@ "spin.js": "~2.0.1", "moment": "~2.8.4", "color-thief": "v2.0", - "mithril": "0.2.0", + "mithril": "lhorie/mithril.js#next", "loader.js": "~3.2.1" } } diff --git a/framework/core/js/forum/src/components/composer.js b/framework/core/js/forum/src/components/composer.js index a9f4b0101..1e8a01ea7 100644 --- a/framework/core/js/forum/src/components/composer.js +++ b/framework/core/js/forum/src/components/composer.js @@ -228,7 +228,8 @@ class Composer extends Component { if ([Composer.PositionEnum.MINIMIZED, Composer.PositionEnum.HIDDEN].indexOf(this.position()) !== -1) { this.position(Composer.PositionEnum.NORMAL); } - this.render(); + // work around https://github.com/lhorie/mithril.js/issues/603 + setTimeout(() => this.render()); } hide() {