« get me outta code hell

client: hoverable-tooltip: consider focus moving, not evaporating - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-04-27 13:03:40 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-04-27 13:03:40 -0300
commitb4dce2cbdfc295402d29badfcc6b7f0db0e91493 (patch)
tree7103d22485bec17761f384a45fded44a8f14b97c /src/static
parent2d492595fa5b30e94153ce186652c15c9f641a2c (diff)
client: hoverable-tooltip: consider focus moving, not evaporating
Diffstat (limited to 'src/static')
-rw-r--r--src/static/js/client/hoverable-tooltip.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/static/js/client/hoverable-tooltip.js b/src/static/js/client/hoverable-tooltip.js
index cdf37ee1..2d1ac552 100644
--- a/src/static/js/client/hoverable-tooltip.js
+++ b/src/static/js/client/hoverable-tooltip.js
@@ -338,7 +338,10 @@ function handleTooltipHoverableLostFocus(hoverable, domEvent) {
   // This will set the tooltipWasJustHidden flag, which is detected by a newly
   // focused hoverable, if applicable. Always specify intent to replace when
   // navigating via tab focus. (Check `handleTooltipLostFocus` for details.)
-  if (!currentlyShownTooltipHasFocus(domEvent.relatedTarget)) {
+  if (
+    domEvent.relatedTarget &&
+    !currentlyShownTooltipHasFocus(domEvent.relatedTarget)
+  ) {
     hideCurrentlyShownTooltip(true);
   }
 }