diff --git a/javascript/extraNetworks.js b/javascript/extraNetworks.js index 2fb87cd5..c46ab1c6 100644 --- a/javascript/extraNetworks.js +++ b/javascript/extraNetworks.js @@ -132,10 +132,12 @@ function popup(contents){ globalPopup.style.display = "flex"; } -function extraNetworksShowMetadata(text){ +function extraNetworksShowMetadata(event, text){ elem = document.createElement('pre') elem.classList.add('popup-metadata'); elem.textContent = text; popup(elem); + + event.stopPropagation() } diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py index 10272dbb..9b7e5e65 100644 --- a/modules/ui_extra_networks.py +++ b/modules/ui_extra_networks.py @@ -127,7 +127,7 @@ class ExtraNetworksPage: metadata_button = "" metadata = item.get("metadata") if metadata: - metadata_onclick = '"' + html.escape(f"""extraNetworksShowMetadata({json.dumps(metadata)}); event.stopPropagation(); return false;""") + '"' + metadata_onclick = '"' + html.escape(f"""return extraNetworksShowMetadata(event, {json.dumps(metadata)})""") + '"' metadata_button = f"
" args = {