From 4eed86919eae50216e6faafa18ae0bb626ffe92a Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 29 Apr 2020 13:30:34 +0200 Subject: [PATCH] FIX: ensures card cloak is removed (#9582) Repro steps for current failure: - use mobile view - click on a different user avatar to show user card - click message - close composer - cloak is still showing and prevents any click --- .../discourse/app/components/group-card-contents.js | 4 ++-- .../discourse/app/components/user-card-contents.js | 4 ++-- .../javascripts/discourse/app/mixins/card-contents-base.js | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/group-card-contents.js b/app/assets/javascripts/discourse/app/components/group-card-contents.js index 71884696fb7..c4aafe5df44 100644 --- a/app/assets/javascripts/discourse/app/components/group-card-contents.js +++ b/app/assets/javascripts/discourse/app/components/group-card-contents.js @@ -65,9 +65,9 @@ export default Component.extend(CardContentsBase, CleansUp, { }, _close() { - this._super(...arguments); - this.set("group", null); + + this._super(...arguments); }, cleanUp() { diff --git a/app/assets/javascripts/discourse/app/components/user-card-contents.js b/app/assets/javascripts/discourse/app/components/user-card-contents.js index b4f0e5cf4bf..629545601ae 100644 --- a/app/assets/javascripts/discourse/app/components/user-card-contents.js +++ b/app/assets/javascripts/discourse/app/components/user-card-contents.js @@ -177,12 +177,12 @@ export default Component.extend(CardContentsBase, CanCheckEmails, CleansUp, { }, _close() { - this._super(...arguments); - this.setProperties({ user: null, topicPostCount: null }); + + this._super(...arguments); }, cleanUp() { diff --git a/app/assets/javascripts/discourse/app/mixins/card-contents-base.js b/app/assets/javascripts/discourse/app/mixins/card-contents-base.js index 2f53c5276f6..b1aeb853dd7 100644 --- a/app/assets/javascripts/discourse/app/mixins/card-contents-base.js +++ b/app/assets/javascripts/discourse/app/mixins/card-contents-base.js @@ -280,6 +280,8 @@ export default Mixin.create({ if (this.site.mobileView) { this._unbindMobileScroll(); } + + this._hide(); }, willDestroyElement() {