Skip to content

Commit

Permalink
[FIX] website_sale: product detail scroll
Browse files Browse the repository at this point in the history
On mobile view, in the product detail page, the image of the product
fills the largest part of the screen. However, when the user tries to
scroll by clicking on the image, it zooms on the image instead of
actually scrolling. This is confusing for the users who report that they
cannot buy anything on the webshop.

A solution is to simply deactivate the zoom on mobile.

opw-704026
  • Loading branch information
nim-odoo committed Mar 30, 2017
1 parent 7bbbc6f commit f60c18d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addons/website_sale/static/src/js/website_sale.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ odoo.define('website_sale.website_sale', function (require) {
var ajax = require('web.ajax');
var utils = require('web.utils');
var core = require('web.core');
var config = require('web.config');
var _t = core._t;

if(!$('.oe_website_sale').length) {
Expand Down Expand Up @@ -452,5 +453,8 @@ odoo.define('website_sale.website_sale', function (require) {
$("select[name='country_id']").change();
});

$('.ecom-zoomable img[data-zoom]').zoomOdoo({ attach: '#o-carousel-product'});
// Deactivate image zoom for mobile devices, since it might prevent users to scroll
if (config.device.size_class > config.device.SIZES.XS) {
$('.ecom-zoomable img[data-zoom]').zoomOdoo({ attach: '#o-carousel-product'});
}
});

0 comments on commit f60c18d

Please sign in to comment.