[FIX] web_editor: summernote: don't create display button to edit table if the editable part is inside the table

This commit is contained in:
Christophe Matthieu
2015-07-10 17:00:13 +02:00
parent f17d6cb6d9
commit 9221eb5b6d
@@ -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();