summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/website.editor.js
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2015-04-07 16:28:19 +0200
committerChristophe Matthieu <chm@odoo.com>2015-04-07 16:28:19 +0200
commitc2c093d6b84970b3c8177db68b3e3c45cd0dc858 (patch)
tree6cbcac59ddb7d989291af90c33eaa6f78612a30d /addons/website/static/src/js/website.editor.js
parent10f5001c25f6f9e6759e1036556c158f7fc0fd30 (diff)
[FIX] website.editor: remove javascript exception when the user close the modal after add a question in website_forum
Diffstat (limited to 'addons/website/static/src/js/website.editor.js')
-rw-r--r--addons/website/static/src/js/website.editor.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js
index 7e01b1d307e..47df86ed228 100644
--- a/addons/website/static/src/js/website.editor.js
+++ b/addons/website/static/src/js/website.editor.js
@@ -519,7 +519,7 @@ define(['summernote/summernote'], function () {
var r = range.create();
if ($(r ? dom.node(r.sc) : event.srcElement || event.target).closest('#website-top-navbar, #oe_main_menu_navbar, .note-popover, .note-toolbar, .modal').length) {
if (!$(event.target).is('input, select, label, button, a')) {
- if (!remember_selection) {
+ if (!remember_selection && $editable[0]) {
remember_selection = range.create(dom.firstChild($editable[0]), 0);
}
try {