diff options
| author | Denis Ledoux <dle@odoo.com> | 2016-06-07 16:42:49 +0200 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2016-06-07 16:48:58 +0200 |
| commit | 4601b044a6e4dbf162cfca9bf0be5ff2a21dd4f5 (patch) | |
| tree | f8880a7371fc53616a4f3bab6a2e60ed51705825 /addons/web/static/src | |
| parent | af470098154354f3b01f3e921dbd892937806b9c (diff) | |
[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
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/control_panel.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/web/static/src/js/control_panel.js b/addons/web/static/src/js/control_panel.js index 5e2cc36a6a1..18a03d8d55c 100644 --- a/addons/web/static/src/js/control_panel.js +++ b/addons/web/static/src/js/control_panel.js @@ -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); |
