N°3817 - Audit and fix calls to deprecated jQuery method

This commit is contained in:
Anne-Cath
2025-08-06 19:47:57 +02:00
parent 1667f834b9
commit 5b9e0a1d4f
66 changed files with 188 additions and 211 deletions

View File

@@ -31,7 +31,7 @@ $.fn.modal.Constructor.prototype.enforceFocus = function () {
var $parent = $(e.target.parentNode);
if ($modalElement[0] !== e.target && !$modalElement.has(e.target).length &&
!$parent.hasClass('ck-input')) {
$(e.target.activeElement).focus();
$(e.target.activeElement).trigger('focus');
}
})
};

View File

@@ -440,7 +440,7 @@ $(function()
window.close();
// In some browser (eg. Firefox 70), window won't close if it has NOT been open by JS. In that case, we try to redirect to homepage as a fallback.
var sHomepageUrl = (this.options.base_url !== null) ? this.options.base_url : $('#sidebar .menu .brick_menu_item:first a').attr('href')
var sHomepageUrl = (this.options.base_url !== null) ? this.options.base_url : $('#sidebar .menu .brick_menu_item').first().find('a').attr('href')
window.location.href = sHomepageUrl;
}
},