From e7b5ae8cac8d1cab57785385b7e036389e8ff266 Mon Sep 17 00:00:00 2001 From: Romain Estievenart Date: Fri, 30 Oct 2020 14:13:39 +0000 Subject: [FIX] web: datepicker inside a dropdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Steps to reproduce: 1. Go to Project 2. Filter > Add custom filter > Last Updated on 3. Click on the date field and use the date picker to change the value 4. The dropdown is closed and you lost your selection => BUG This bug was due to a conflict between owl and bs dropdown (e4f87710), to prevent this bug, we added a check to ensure there are no open bootstrap calendar inside the current dom. Note that if you click outside the dropdown, the datepicker is already closed when you go through this code. It means that the datepicker will not be present in the DOM anymore and the dropdown can be closed too. opw-2373573 closes odoo/odoo#61258 X-original-commit: 73dfc1f7a8e2197fcdd4053ec57c260576593a15 Signed-off-by: Adrien Dieudonné (adr) Signed-off-by: res-odoo --- addons/web/static/src/js/components/dropdown_menu.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'addons/web/static/src/js/components') diff --git a/addons/web/static/src/js/components/dropdown_menu.js b/addons/web/static/src/js/components/dropdown_menu.js index 37fe6374983..8c1676d8952 100644 --- a/addons/web/static/src/js/components/dropdown_menu.js +++ b/addons/web/static/src/js/components/dropdown_menu.js @@ -133,6 +133,10 @@ odoo.define('web.DropdownMenu', function (require) { return; } } + // check for an active open bootstrap calendar like the filter dropdown inside the search panel) + if (document.querySelector('body > .bootstrap-datetimepicker-widget')) { + return; + } this.state.open = false; } } -- cgit v1.2.3