« get me outta code hell

client: image-overlay: gently consider horizontal nearness - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-04-13 06:32:34 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-04-13 06:32:34 -0300
commitf3ea401da511feb6bacdb64d81b5e074271f6466 (patch)
treea2967105cafa2c29b3cc41929f200485674e94c3
parent3a4b6c6be781ca53b9e1e256ce8ea47055d94759 (diff)
client: image-overlay: gently consider horizontal nearness
-rw-r--r--src/static/js/client/image-overlay.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/static/js/client/image-overlay.js b/src/static/js/client/image-overlay.js
index da192178..e9e2708d 100644
--- a/src/static/js/client/image-overlay.js
+++ b/src/static/js/client/image-overlay.js
@@ -96,7 +96,10 @@ function handleContainerClicked(evt) {
   // If you clicked anything near the action bar, don't hide the
   // image overlay.
   const rect = info.actionContainer.getBoundingClientRect();
-  if (evt.clientY >= rect.top - 40 && evt.clientY <= rect.bottom + 40) {
+  if (
+    evt.clientY >= rect.top - 40 && evt.clientY <= rect.bottom + 40 &&
+    evt.clientX >= rect.left + 20 && evt.clientX <= rect.right - 20
+  ) {
     return;
   }