[FIX] web: prevent search dropdowns to close on click inside
In the Filters, Group By and Favorites dropdowns, when clicking outside the `li` elements but still inside the dropdown menu itself (like on the dividers, or next to the advanced search `Apply` button), the dropdowns was closed. This behavior was annoying when doing an advanced search with a field using the datetime picker, as, to close the datetime picker, you have to click outside it, and when you did, it closed automatically the filter dropdown... So you had to open it again to finally apply the filter. opw-674310
This commit is contained in:
@@ -67,6 +67,11 @@ var ControlPanel = Widget.extend({
|
||||
$switch_buttons: this.$('.oe-cp-switch-buttons'),
|
||||
};
|
||||
|
||||
// Prevent the search dropdowns to close when clicking inside them
|
||||
this.$el.on('click.bs.dropdown', '.oe-search-options .dropdown-menu', function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
// By default, hide the ControlPanel and remove its contents from the DOM
|
||||
this._toggle_visibility(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user