Optimized tooltip hide handling

This commit is contained in:
Bernd Bestel
2025-01-17 17:22:37 +01:00
parent ded742a7c1
commit 6605eeafd0
12 changed files with 7 additions and 49 deletions

View File

@@ -876,13 +876,9 @@ $('[data-toggle="tooltip"][data-html="true"]').on("shown.bs.tooltip", function()
RefreshLocaleNumberDisplay(".tooltip");
})
$(document).on("click", "#clear-filter-button", function(e)
{
$(".tooltip").tooltip("hide");
});
$(document).on("click", '.btn, a, button', function(e)
{
// Remove focus after click
// Remove focus and hide any tooltips after click
document.activeElement.blur();
$(".tooltip").tooltip("hide");
});

View File

@@ -73,7 +73,7 @@ $.extend(true, $.fn.dataTable.defaults, {
{
var rowGroup = JSON.parse(Grocy.UserSettings[settingKey]);
// Check if there way changed. the draw event is called often therefore we have to check if it's really necessary
// The draw event is called often therefore we have to check if it's really necessary
if (rowGroup.enable !== api.rowGroup().enabled()
|| ("dataSrc" in rowGroup && rowGroup.dataSrc !== api.rowGroup().dataSrc()))
{

View File

@@ -1,5 +1,5 @@
$('.navbar-sidenav [data-toggle="tooltip"]').tooltip({
template: '<div class="tooltip navbar-sidenav-tooltip" role="tooltip" style="pointer-events: none;"><div class="arrow"></div><div class="tooltip-inner"></div></div>'
template: '<div class="tooltip navbar-sidenav-tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>'
})
$("#sidenavToggler").click(function(e)