summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/website.snippets.editor.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website/static/src/js/website.snippets.editor.js')
-rw-r--r--addons/website/static/src/js/website.snippets.editor.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js
index 068893492bd..a1e010a3bcd 100644
--- a/addons/website/static/src/js/website.snippets.editor.js
+++ b/addons/website/static/src/js/website.snippets.editor.js
@@ -1944,16 +1944,19 @@
}
},
- on_clone: function () {
+ on_clone: function (event) {
+ event.preventDefault();
var $clone = this.$target.clone(false);
this.$target.after($clone);
for (var i in this.styles){
this.styles[i].on_clone($clone);
}
+ this.BuildingBlock.create_overlay(this.$target);
return false;
},
- on_remove: function () {
+ on_remove: function (event) {
+ event.preventDefault();
this.on_blur();
this.BuildingBlock.parent.rte.historyRecordUndo(this.$target);
@@ -1977,6 +1980,10 @@
}
}
+ // clean editor if they are image or table in deleted content
+ $(".note-control-selection").hide();
+ $('.o_table_handler').remove();
+
return false;
},