summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/core.js
diff options
context:
space:
mode:
authorCedric Snauwaert <csn@openerp.com>2014-10-23 11:49:07 +0200
committerCedric Snauwaert <csn@openerp.com>2014-10-23 15:04:59 +0200
commit44eed595df5d5f69472d09a7092944bc490820f8 (patch)
treefdc19b9ed71e4694f584e5a0eb6defdf1bcc0baa /addons/web/static/src/js/core.js
parent8521e701fae4ebe3ae35ef714cbfe916a215bd36 (diff)
[FIX] web: remove enforceFocus method from bootstrap modal since it is conflicting with other non bootstrap element
This method trigger the focus event when clicking inside the modal, causing a blur event on other widgets resulting in unwanted problem. Typical case is for the jquery datetimepicker where we try to open a select element which will close right after.
Diffstat (limited to 'addons/web/static/src/js/core.js')
-rw-r--r--addons/web/static/src/js/core.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js
index 6e9aafa83c3..31a94756246 100644
--- a/addons/web/static/src/js/core.js
+++ b/addons/web/static/src/js/core.js
@@ -776,6 +776,7 @@ $.fn.tooltip.Constructor.DEFAULTS.trigger = 'hover focus click';
$.fn.tooltip.Constructor.DEFAULTS.container = 'body';
//overwrite bootstrap tooltip method to prevent showing 2 tooltip at the same time
var bootstrap_show_function = $.fn.tooltip.Constructor.prototype.show;
+$.fn.modal.Constructor.prototype.enforceFocus = function () { };
$.fn.tooltip.Constructor.prototype.show = function () {
$('.tooltip').remove();
//the following fix the bug when using placement