diff --git a/install/package.json b/install/package.json index 7b7a8f28a7..97cb9b1764 100644 --- a/install/package.json +++ b/install/package.json @@ -110,7 +110,7 @@ "nodebb-theme-harmony": "2.1.10", "nodebb-theme-lavender": "7.1.18", "nodebb-theme-peace": "2.2.40", - "nodebb-theme-persona": "14.1.8", + "nodebb-theme-persona": "14.1.9", "nodebb-widget-essentials": "7.0.36", "nodemailer": "6.10.1", "nprogress": "0.2.0", diff --git a/public/src/client/header.js b/public/src/client/header.js index f0ef69cf42..54c604f47f 100644 --- a/public/src/client/header.js +++ b/public/src/client/header.js @@ -44,12 +44,24 @@ define('forum/header', [ return; } - $('#header-menu #main-nav').tooltip({ - selector: '.nav-item', - placement: 'bottom', - trigger: 'hover', - container: 'body', + // only affects persona, harmony uses a different structure in harmony.js + const tooltipEls = $('#header-menu .nav-item[title]'); + + tooltipEls.tooltip({ + trigger: 'manual', animation: false, + placement: 'bottom', + }); + + tooltipEls.on('mouseenter', function (ev) { + const target = $(ev.target); + const isDropdown = target.hasClass('dropdown-menu') || !!target.parents('.dropdown-menu').length; + if (!isDropdown) { + $(this).tooltip('show'); + } + }); + tooltipEls.on('click mouseleave', function () { + $(this).tooltip('hide'); }); }