[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.
This commit is contained in:
Cedric Snauwaert 2014-10-23 11:49:07 +02:00
parent 8521e701fa
commit 44eed595df
1 changed files with 1 additions and 0 deletions

View File

@ -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