summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-10-21 19:32:18 +0200
committerTor Andersson <tor@ccxvii.net>2023-10-21 19:37:20 +0200
commit924c95dbe2bce61ad1d6c67ea69341c6fad57696 (patch)
tree43148aee5918c419b5a808f02666a2cd19679c55
parent01a292c297cb8260f9aaf831169f15ceda731988 (diff)
download300-earth-and-water-924c95dbe2bce61ad1d6c67ea69341c6fad57696.tar.gz
fix popup menu
-rw-r--r--play.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/play.js b/play.js
index f704824..581ecb1 100644
--- a/play.js
+++ b/play.js
@@ -656,10 +656,10 @@ function show_popup_menu(evt, menu_id, target_id, title) {
menu.style.left = x + "px"
menu.style.top = y + "px"
- return true
+ evt.stopPropagation()
+ } else {
+ menu.style.display = "none"
}
-
- return false
}
function hide_popup_menu() {
@@ -685,7 +685,6 @@ function on_card(evt) {
show_popup_menu(evt, "popup", card, GREEK_EVENT_NAMES[card])
else
show_popup_menu(evt, "popup", card, PERSIAN_EVENT_NAMES[card])
- evt.stopPropagation()
}
}
}