[FIX] web_editor: prevent deleting carousel-item with the delete button
Indeed, the carousel-item elements are linked to other DOM (like indicators) and removing one would imply enabling another one... all of this is handled by the carousel "remove slide" option. Note: the UI to add and remove slides will be refactored in a future update of this future saas anyway. Part of https://github.com/odoo/odoo/pull/38997 task-2090180 closes odoo/odoo#38997 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -97,7 +97,7 @@ var SnippetEditor = Widget.extend({
|
||||
$customize.find('.oe_snippet_clone').addClass('d-none');
|
||||
}
|
||||
|
||||
if (!this.isTargetParentEditable) {
|
||||
if (!this.isTargetParentEditable || this.$target.is('.carousel-item')) { // TODO get rid of the carousel-item hack somehow
|
||||
$customize.find('.oe_snippet_remove').addClass('d-none');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user