summaryrefslogtreecommitdiff
path: root/addons/web/static
diff options
context:
space:
mode:
authorRomain Estievenart <res@odoo.com>2020-10-30 14:13:39 +0000
committerRomain Estievenart <res@odoo.com>2020-11-03 12:23:54 +0000
commite7b5ae8cac8d1cab57785385b7e036389e8ff266 (patch)
treece33339e0ceb0551204cd701605e0bd2e36994e6 /addons/web/static
parentfab31e378d2069ff6f2bd18365de2f116a43b872 (diff)
[FIX] web: datepicker inside a dropdown
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) <adr@odoo.com> Signed-off-by: res-odoo <res-odoo@users.noreply.github.com>
Diffstat (limited to 'addons/web/static')
-rw-r--r--addons/web/static/src/js/components/dropdown_menu.js4
1 files changed, 4 insertions, 0 deletions
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;
}
}