From af02cbd4ef711a22d36e677531d6664e1a8ab376 Mon Sep 17 00:00:00 2001 From: Antoine Guenet Date: Tue, 8 Dec 2020 08:57:20 +0000 Subject: [PATCH] [FIX] website_forum: ensure media modal opens on click button Clicking the media button failed to open the media modal. The reason was that initializing the media modal involved triggering an RPC to fetch attachments but that resulted in a never-resolving promise because `trigger_up('call_service')` was never caught. That is because `website_forum` failed to pass itself as parent of `wysiwyg` when instantiating the editor, thus breaking the chain that should have led to `public_root`, which listens to `'call_service'` custom events. closes odoo/odoo#62991 Signed-off-by: David Monjoie (dmo) --- addons/website_forum/static/src/js/website_forum.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_forum/static/src/js/website_forum.js b/addons/website_forum/static/src/js/website_forum.js index 5504a98350b..0386c99903a 100644 --- a/addons/website_forum/static/src/js/website_forum.js +++ b/addons/website_forum/static/src/js/website_forum.js @@ -181,7 +181,7 @@ publicWidget.registry.websiteForum = publicWidget.Widget.extend({ `, }; - await wysiwygLoader.loadFromTextarea(this, $textarea, options); + await wysiwygLoader.loadFromTextarea(self, $textarea, options); }); _.each(this.$('.o_wforum_bio_popover'), authorBox => {