From 607af4b8fc1d4f748bcd8ab3dec15655f56b117c Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 31 Aug 2024 23:58:26 +0300 Subject: [PATCH] client: Dismiss tooltip if clicking a link inside it --- src/public/app/services/note_tooltip.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/public/app/services/note_tooltip.js b/src/public/app/services/note_tooltip.js index be6214be9..d462b788b 100644 --- a/src/public/app/services/note_tooltip.js +++ b/src/public/app/services/note_tooltip.js @@ -86,6 +86,11 @@ async function mouseEnterHandler() { }); $(this).tooltip('show'); + + // Dismiss the tooltip immediately if a link was clicked inside the tooltip. + $(`.${tooltipClass} a`).on("click", (e) => { + $(this).tooltip('dispose'); + }); // the purpose of the code below is to: // - allow user to go from hovering the link to hovering the tooltip to be able to scroll,