summaryrefslogtreecommitdiff
path: root/addons/web_editor/static
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2015-03-12 10:05:52 +0100
committerChristophe Matthieu <chm@odoo.com>2015-07-10 17:00:13 +0200
commit9221eb5b6df489cb3b345ca3c91cf5fe197c7286 (patch)
treee92346d2b6b3307c261e6a5f2846714cb86430cf /addons/web_editor/static
parentf17d6cb6d95a62ccdef81e83b4f9dcb18e12632c (diff)
[FIX] web_editor: summernote: don't create display button to edit table if the editable part is inside the table
Diffstat (limited to 'addons/web_editor/static')
-rw-r--r--addons/web_editor/static/src/js/summernote.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/summernote.js b/addons/web_editor/static/src/js/summernote.js
index 67bb5c8e994..fd9f8ca0461 100644
--- a/addons/web_editor/static/src/js/summernote.js
+++ b/addons/web_editor/static/src/js/summernote.js
@@ -1969,8 +1969,6 @@ $.summernote.pluginEvents.applyFont = function (event, editor, layoutInfo, color
}
}
- range.create(startPoint.node, startPoint.offset, endPoint.node, endPoint.offset).select();
-};
$.summernote.pluginEvents.fontSize = function (event, editor, layoutInfo, value) {
var $editable = layoutInfo.editable();
event.preventDefault();
@@ -2036,6 +2034,9 @@ function summernote_table_update (oStyle) {
return;
}
var table = dom.ancestor(oStyle.range.sc, dom.isTable);
+ if (!table) { // if the editable tag is inside the table
+ return;
+ }
var $editable = $(table).closest('.o_editable');
$('.o_table_handler').remove();