fix for firefox datepicker focus problem in modals (#630)
This commit is contained in:
@@ -116,8 +116,7 @@ $(function() {
|
||||
$(this).find('a.anchor').hide();
|
||||
});
|
||||
},
|
||||
reloadDatatableWithToolbarFilter: function()
|
||||
{
|
||||
reloadDatatableWithToolbarFilter: function() {
|
||||
var $form = $('.toolbar form');
|
||||
var loading = '<div class="overlay"><i class="fas fa-sync fa-spin"></i></div>';
|
||||
$('section.content').append(loading);
|
||||
@@ -256,6 +255,17 @@ $(function() {
|
||||
);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// a fix for firefox focus problems with datepicker in modal
|
||||
// see https://github.com/kevinpapst/kimai2/issues/618
|
||||
var enforceModalFocusFn = $.fn.modal.Constructor.prototype.enforceFocus;
|
||||
$.fn.modal.Constructor.prototype.enforceFocus = function() {};
|
||||
$modal.on('hidden', function() {
|
||||
$.fn.modal.Constructor.prototype.enforceFocus = enforceModalFocusFn;
|
||||
});
|
||||
$modal.modal({ backdrop : false });
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
$modal.modal('show');
|
||||
|
||||
// the new form that was loaded via ajax
|
||||
|
||||
Reference in New Issue
Block a user