diff options
| author | Jeremy Kersten <jke@odoo.com> | 2020-07-16 14:15:43 +0000 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2020-07-16 15:22:14 +0000 |
| commit | b9b228f1953d2989a68e272301530d3883eef20c (patch) | |
| tree | 8f40fc35bd438ef5fbe0b7c789144c2e4afda427 /addons/website_forum/static | |
| parent | decf5147d1fb5569c3036d2ff45aa9350f28aa00 (diff) | |
[FIX] website_forum: fix traceback on comment
Before this commit, try to post a comment will raise a traceback in front end
because textarea is not found.
Now, we check that we are writing in textarea content and no more in textarea
comment.
closes odoo/odoo#54595
X-original-commit: 867458456b13daf9b5586c17b7475e68d9d008e1
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/website_forum/static')
| -rw-r--r-- | addons/website_forum/static/src/js/website_forum.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_forum/static/src/js/website_forum.js b/addons/website_forum/static/src/js/website_forum.js index dcbca2e364a..65325a17c60 100644 --- a/addons/website_forum/static/src/js/website_forum.js +++ b/addons/website_forum/static/src/js/website_forum.js @@ -202,7 +202,7 @@ publicWidget.registry.websiteForum = publicWidget.Widget.extend({ } // Because the textarea is hidden, we add the red or green border to its container - if ($textarea[0].required) { + if ($textarea[0] && $textarea[0].required) { let $textareaContainer = $form.find('.o_wysiwyg_wrapper .note-editor.panel.panel-default'); if (!textareaContent.length) { $textareaContainer.addClass('border border-danger rounded-top'); |
