summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2018-02-07 15:55:20 +0100
committerqsm-odoo <qsm@odoo.com>2018-02-08 10:48:14 +0100
commitce51ad7e69dbc1415eaf5f2ae846bbe89a37f69b (patch)
tree9d4cf2fe24c28fd57bb3b47f6480eeb727ab7925 /addons/web_editor/static/src/js
parent8dfd6a2507c2b59016d466d818c0d42afbfdb027 (diff)
[FIX] web_editor: allow deleting all images in table cells
Before this commit, it was impossible to delete an image which was a direct child of a table cell using the trash-icon button in the toolbar. This commit fixes the behavior by changing the logic quite a lot, so it is kinda tricky (see https://github.com/odoo/odoo/commit/25849e918651eba080dac3af4e4fcdc8f1280241 for more explaination). Closes https://github.com/odoo/odoo/issues/22523
Diffstat (limited to 'addons/web_editor/static/src/js')
-rw-r--r--addons/web_editor/static/src/js/summernote.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/summernote.js b/addons/web_editor/static/src/js/summernote.js
index 9c5ef38d43d..574836d0180 100644
--- a/addons/web_editor/static/src/js/summernote.js
+++ b/addons/web_editor/static/src/js/summernote.js
@@ -1313,7 +1313,7 @@ function summernote_keydown_clean (field) {
function remove_table_content(r) {
var ancestor = r.commonAncestor();
- var nodes = dom.listBetween(r.sc, r.ec);
+ var nodes = dom.listBetween(r.sc, r.ec, r.so, r.eo);
if (dom.isText(r.sc)) {
r.sc.textContent = r.sc.textContent.slice(0, r.so);
}