From 298615bbfac5f8c81fcb90e420c366b431917f9f Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Fri, 1 Dec 2023 16:13:11 -0800 Subject: [PATCH] Fix showing item context menu in chests & corpses when quickpickup enabled Closes: https://github.com/arianne/stendhal/issues/583 --- srcjs/stendhal/ui/component/ItemContainerImplementation.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/srcjs/stendhal/ui/component/ItemContainerImplementation.ts b/srcjs/stendhal/ui/component/ItemContainerImplementation.ts index f840b02ea65..60129f41982 100644 --- a/srcjs/stendhal/ui/component/ItemContainerImplementation.ts +++ b/srcjs/stendhal/ui/component/ItemContainerImplementation.ts @@ -260,7 +260,9 @@ export class ItemContainerImplementation { } let event = stendhal.ui.html.extractPosition(evt); if ((event.target as any).dataItem) { - if (this.quickPickup) { + const long_touch = stendhal.ui.touch.isLongTouch(); + const context_action = (evt instanceof MouseEvent && this.isRightClick(evt)) || long_touch; + if (this.quickPickup && !context_action) { marauroa.clientFramework.sendAction({ type: "equip", "source_path": (event.target as any).dataItem.getIdPath(), @@ -271,7 +273,6 @@ export class ItemContainerImplementation { return; } - const long_touch = stendhal.ui.touch.isLongTouch(); if (this.isRightClick(event) || long_touch) { const append = []; if (window['TouchEvent'] && evt instanceof TouchEvent && long_touch) {