summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-10-21 19:33:08 +0200
committerTor Andersson <tor@ccxvii.net>2023-10-21 19:37:45 +0200
commit1947f2232adf98d39a224690a86bac533da88d9f (patch)
tree991f1255a0e88f5c699eb5896eddebdfd2870305
parent2fb32d05f97b6787c5a01f209cc1791395e76bfe (diff)
downloadwilderness-war-1947f2232adf98d39a224690a86bac533da88d9f.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 4a6fe70..577535e 100644
--- a/play.js
+++ b/play.js
@@ -755,10 +755,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() {
@@ -785,7 +785,6 @@ function on_click_card(evt) {
send_action('card', card)
} else {
show_popup_menu(evt, "popup", card, cards[card].name)
- evt.stopPropagation()
}
}