summaryrefslogtreecommitdiff
path: root/addons/website/static/src/snippets/s_image_gallery
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website/static/src/snippets/s_image_gallery')
-rw-r--r--addons/website/static/src/snippets/s_image_gallery/000.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/addons/website/static/src/snippets/s_image_gallery/000.js b/addons/website/static/src/snippets/s_image_gallery/000.js
index 3bd6c10f389..19e98a7b341 100644
--- a/addons/website/static/src/snippets/s_image_gallery/000.js
+++ b/addons/website/static/src/snippets/s_image_gallery/000.js
@@ -99,9 +99,6 @@ const GallerySliderWidget = publicWidget.Widget.extend({
$lis.each(function (i) {
$(this).toggleClass('d-none', i < page * nbPerPage || i >= (page + 1) * nbPerPage);
});
- if (self.editableMode) { // do not remove DOM in edit mode
- return;
- }
if (page <= 0) {
self.$prev.detach();
} else {
@@ -133,7 +130,11 @@ const GallerySliderWidget = publicWidget.Widget.extend({
page += ($(this).hasClass('o_indicators_left') ? -1 : 1);
page = Math.max(0, Math.min(nbPages - 1, page)); // should not be necessary
self.$carousel.carousel(page * realNbPerPage);
- hide();
+ // We dont use hide() before the slide animation in the editor because there is a traceback
+ // TO DO: fix this traceback
+ if (!self.editableMode) {
+ hide();
+ }
});
this.$carousel.on('slid.bs.carousel.gallery_slider', update);