From 924c95dbe2bce61ad1d6c67ea69341c6fad57696 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 21 Oct 2023 19:32:18 +0200 Subject: fix popup menu --- play.js | 7 +++---- 1 file 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() } } } -- cgit v1.2.3