summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/chrome/abstract_web_client.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-05-13 11:02:27 +0200
committerChristophe Simonis <chs@odoo.com>2019-05-13 11:02:27 +0200
commit60e71302a38b36214efec1213882f573e3ea453c (patch)
treed6c4f548ac29c94891a52444887a230a7c30d403 /addons/web/static/src/js/chrome/abstract_web_client.js
parent3936d655c4bfd845b6ead724cecdc8e7c62816eb (diff)
parent243a4ae5cbc07027cd3eaf0ead036b9d3586dea3 (diff)
[MERGE] forward port branch saas-12.2 up to 243a4ae5cbc
Diffstat (limited to 'addons/web/static/src/js/chrome/abstract_web_client.js')
-rw-r--r--addons/web/static/src/js/chrome/abstract_web_client.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/addons/web/static/src/js/chrome/abstract_web_client.js b/addons/web/static/src/js/chrome/abstract_web_client.js
index 68ac157868d..c27311d4df5 100644
--- a/addons/web/static/src/js/chrome/abstract_web_client.js
+++ b/addons/web/static/src/js/chrome/abstract_web_client.js
@@ -31,7 +31,9 @@ var qweb = core.qweb;
var AbstractWebClient = Widget.extend(ServiceProviderMixin, KeyboardNavigationMixin, {
dependencies: ['notification'],
- events: _.extend(KeyboardNavigationMixin.events, {}),
+ events: _.extend({}, KeyboardNavigationMixin.events, {
+ 'click .o_search_options .dropdown-menu': '_onClickDropDownMenu',
+ }),
custom_events: {
clear_uncommitted_changes: function (e) {
this.clear_uncommitted_changes().then(e.data.callback);
@@ -334,6 +336,16 @@ var AbstractWebClient = Widget.extend(ServiceProviderMixin, KeyboardNavigationMi
//--------------------------------------------------------------------------
/**
+ * When clicking inside a dropdown to modify search options
+ * prevents the bootstrap dropdown to close on itself
+ *
+ * @private
+ * @param {Event} ev
+ */
+ _onClickDropDownMenu: function (ev) {
+ ev.stopPropagation();
+ },
+ /**
* Whenever the connection is lost, we need to notify the user.
*
* @private