From 582b0fdc334de780a39e805d468411b8f2503a20 Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Mon, 18 Mar 2024 13:36:23 -0700 Subject: [PATCH] Allow browser's context menu in about dialog --- src/js/stendhal/ui/dialog/AboutDialog.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/js/stendhal/ui/dialog/AboutDialog.ts b/src/js/stendhal/ui/dialog/AboutDialog.ts index 0a6d1a97eb9..99eefa73a7e 100644 --- a/src/js/stendhal/ui/dialog/AboutDialog.ts +++ b/src/js/stendhal/ui/dialog/AboutDialog.ts @@ -15,6 +15,9 @@ import { TabDialogContentComponent } from "../toolkit/TabDialogContentComponent" import { Layout } from "../../util/Layout"; +/** + * Dialog displaying licensing and contributor information. + */ export class AboutDialog extends TabDialogContentComponent { constructor() { @@ -24,6 +27,11 @@ export class AboutDialog extends TabDialogContentComponent { this.addTab("Contributors", new Panel(this.child("#contributors")!)); this.addCloseButton(); + this.child("#aboutdialog-content")!.addEventListener("contextmenu", (evt: MouseEvent) => { + // allow browser context menu in about dialog + evt.stopPropagation(); + }); + this.load(); }