[FIX] website: disable products carousel slide in edit mode
We have a public widget that disables automatic slides on carousels when the user is in edit mode (see `registry.slider`). Unfortunately, since [this commit], the automatic slide of the carousel in the "Products" block was not disabled in edit mode. This was because a `widget_start_request` was made without specifying whether the user is in edit mode. When it's not specify, we consider that we are not in edit mode. As a result, the public widget no longer stopped the carousel because it considered that it was not in edit mode. This commit fixes this problem by correcting `widget_start_request`. Steps to reproduce the bug fixed by this commit: - Have an ecommerce - Edit a page - Drop the "Products" block => If you wait a few seconds, the carousel moves, even though it shouldn't as long as you're editing your site. [this commit]: https://github.com/odoo/odoo/commit/7af099ccf1e5892513c1b0827553fe93614f2f07 task-3356629 closes odoo/odoo#127185 X-original-commit: 4231aca9665829673e29a027469471743dab16c4 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com> Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
This commit is contained in:
@@ -176,7 +176,11 @@ const DynamicSnippet = publicWidget.Widget.extend({
|
||||
this.renderedContent = '';
|
||||
}
|
||||
this._renderContent();
|
||||
this.trigger_up('widgets_start_request', {$target: this.$el.children(), options: {parent: this}});
|
||||
this.trigger_up('widgets_start_request', {
|
||||
$target: this.$el.children(),
|
||||
options: {parent: this},
|
||||
editableMode: this.editableMode,
|
||||
});
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
|
||||
Reference in New Issue
Block a user