From 74e7da56946c8b9d4e684a96a02bce82982a5757 Mon Sep 17 00:00:00 2001 From: Elisabeth Dickinson Date: Tue, 25 May 2021 14:36:55 +0200 Subject: [PATCH] [FIX] odoo_theme: hide searchbar on scroll in mobile --- extensions/odoo_theme/static/js/menu.js | 21 ++++++++++++++------- extensions/odoo_theme/static/style.scss | 14 +++++++++++++- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/extensions/odoo_theme/static/js/menu.js b/extensions/odoo_theme/static/js/menu.js index 6e437dd58..2f4d3aef7 100644 --- a/extensions/odoo_theme/static/js/menu.js +++ b/extensions/odoo_theme/static/js/menu.js @@ -47,14 +47,21 @@ } }; + document.addEventListener('scroll', () => { + // Allow to hide the searchbar when the page is scrolled in mobile. + _flagHeaderWithScrollPosition(); + }); + /** - * Mobile: Toggle open/close sidebar on click of nav button (&& on swipe left to right?). - * - * - * `o_active_toc_entry` class, and their related (parent) TOC entry list (