From 9221eb5b6df489cb3b345ca3c91cf5fe197c7286 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 12 Mar 2015 10:05:52 +0100 Subject: [PATCH] [FIX] web_editor: summernote: don't create display button to edit table if the editable part is inside the table --- addons/web_editor/static/src/js/summernote.js | 5 +++-- 1 file 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();