From 4c4e05af1e7d22022fc5df3fb9121d0a8347fc2e Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 21 Oct 2023 19:32:50 +0200 Subject: fix popup menu --- play.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'play.js') diff --git a/play.js b/play.js index c59aa3e..33f9091 100644 --- a/play.js +++ b/play.js @@ -540,10 +540,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() { @@ -561,7 +561,6 @@ function on_click_card(evt) { show_popup_menu(evt, "us_popup", card, US_CARD_NAMES[card - 1]) else show_popup_menu(evt, "tr_popup", card, TR_CARD_NAMES[card - 28]) - evt.stopPropagation() } } } -- cgit v1.2.3