From abf487fcd73cd2bef634c6ca37ceddc8337b5e4d Mon Sep 17 00:00:00 2001 From: std-odoo Date: Fri, 14 Apr 2023 09:30:12 +0000 Subject: [PATCH] [FIX] web: properties, close popover with 1 click instead of 2 Purpose ======= When the focus is inside the label of the property, if we click outside of the popover we need to click a second time to close the popover. Before that code was used to solve a bug where the definition popover was closed when you select the text inside the property label. It seems not necessary anymore, and it causes the issue above. Task-3188915 Part-of: odoo/odoo#119811 --- .../static/src/views/fields/properties/properties_field.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/addons/web/static/src/views/fields/properties/properties_field.js b/addons/web/static/src/views/fields/properties/properties_field.js index f75418f549a..bc6ca85906c 100644 --- a/addons/web/static/src/views/fields/properties/properties_field.js +++ b/addons/web/static/src/views/fields/properties/properties_field.js @@ -143,11 +143,6 @@ export class PropertiesField extends Component { * @returns {boolean} */ checkPopoverClose(target) { - if (document.activeElement.closest(".o_field_property_definition")) { - // the focus is still on an element of the definition - return false; - } - if (target.closest(".bootstrap-datetimepicker-widget")) { // selected a datetime, do not close the definition popover return false;