From f00fcbfca6311c24cb9c96b57cd7f2e68e373d20 Mon Sep 17 00:00:00 2001 From: Romain Estievenart Date: Fri, 30 Oct 2020 14:13:39 +0000 Subject: [PATCH] [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#61262 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(+) diff --git a/addons/web/static/src/js/components/dropdown_menu.js b/addons/web/static/src/js/components/dropdown_menu.js index ca514e4a5bf..eba1dc1b654 100644 --- a/addons/web/static/src/js/components/dropdown_menu.js +++ b/addons/web/static/src/js/components/dropdown_menu.js @@ -154,6 +154,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; } }