From ed76c3700c3c9d3e5eeceaa84af8610ee8814d5e Mon Sep 17 00:00:00 2001 From: "Antoine (ande)" Date: Thu, 4 Jan 2024 16:28:37 +0000 Subject: [PATCH] [FIX] point_of_sale: cannot scroll in categories Current behaviour: When there is too many product categories, you cannot see the last items, because the scrollbar is hidden. This was made to hide the scrollbar on mobile. Steps to reproduce: 1. Go to Point of Sale 2. Configuration > PoS Product Categories 3. Duplicate one category 12 times 4. Uncheck Restrict Categories 5. Dashboard > New Session 6. The list of categories is too long 7. Cannot see the last items Cause of the issue: Introduced by https://github.com/odoo/odoo/commit/60f41b1f831248c58f554dbe40114ef0d4ce42c0#diff-f23069b3927b8544dd51433e277cf8b650b10a67e5b8648155e427aaa31c19a3R838 Fix: Make the scrollbar disappear on mobile, and appear otherwise. opw-3653429 closes odoo/odoo#150154 X-original-commit: 0f7fbede653dcb7c91536ea9c87df7d831a0c8cf Signed-off-by: Joseph Caburnay (jcb) --- .../product_screen/product_list/product_list.scss | 9 +++++++++ .../screens/product_screen/product_list/product_list.xml | 1 + 2 files changed, 10 insertions(+) diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/product_list/product_list.scss b/addons/point_of_sale/static/src/app/screens/product_screen/product_list/product_list.scss index bd44093e175..1b11268030c 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/product_list/product_list.scss +++ b/addons/point_of_sale/static/src/app/screens/product_screen/product_list/product_list.scss @@ -11,3 +11,12 @@ .button-no-demo { color: #017e84 !important; } + +.scrollbar-hidden { + -ms-overflow-style: none; + scrollbar-width: none; + + &::-webkit-scrollbar { + display: none; + } +} diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/product_list/product_list.xml b/addons/point_of_sale/static/src/app/screens/product_screen/product_list/product_list.xml index d4f05a93198..15f81b00381 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/product_list/product_list.xml +++ b/addons/point_of_sale/static/src/app/screens/product_screen/product_list/product_list.xml @@ -9,6 +9,7 @@ categories="getCategories()" onClick="(id) => this.pos.setSelectedCategoryId(id)" showImage="showCategoryImages" + class="ui.isSmall ? 'scrollbar-hidden' : ''" />