From 52d9367e3ccc069f992963bfa8cbf9b76233e1c0 Mon Sep 17 00:00:00 2001 From: Mashy Date: Tue, 19 Nov 2019 23:11:18 +1000 Subject: [PATCH] don't clear vbox selected on inventory click --- client/src/components/vbox.component.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/components/vbox.component.jsx b/client/src/components/vbox.component.jsx index eb88a7e1..d6a71256 100644 --- a/client/src/components/vbox.component.jsx +++ b/client/src/components/vbox.component.jsx @@ -283,7 +283,11 @@ class Vbox extends preact.Component { const inventoryHighlight = vboxSelecting || itemUnequip.length; if (!v && v !== 0) { - return ; + const emptyInvClick = () => { + if (vboxSelecting) return vboxBuySelected(); + return false; + }; + return ; } const combinerItems = combiner.map(j => vbox.bound[j]); @@ -303,7 +307,6 @@ class Vbox extends preact.Component { const comboHighlight = combinerItems.length > 0 && comboItem ? 'combo-border' : ''; function onClick(type) { - if (vboxSelecting) clearVboxSelected(); if (reclaiming) return sendVboxReclaim(i); const combinerContainsIndex = combiner.indexOf(i) > -1; @@ -395,7 +398,6 @@ class Vbox extends preact.Component { function inventoryElement() { function inventoryClick(e) { e.stopPropagation(); - if (vboxSelecting) return vboxBuySelected(); if (itemUnequip.length) return sendItemUnequip(itemUnequip); return true; }