fix(locker): use onPointerDown for wardrobe slot clicks
- Change onClick to onPointerDown with preventDefault - Prevents Tooltip from intercepting the click event - Slot picker dialog now opens reliably when clicking hotspots
This commit is contained in:
parent
58b70fc154
commit
11e9bfef24
1 changed files with 4 additions and 1 deletions
|
|
@ -97,7 +97,10 @@ export function Wardrobe({
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
aria-label={`${layout.label} slot: ${asset ? asset.name : "empty"}`}
|
aria-label={`${layout.label} slot: ${asset ? asset.name : "empty"}`}
|
||||||
onClick={() => onSlotClick(layout.name)}
|
onPointerDown={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
onSlotClick(layout.name);
|
||||||
|
}}
|
||||||
className={cn(
|
className={cn(
|
||||||
"absolute flex items-center justify-center rounded-full border transition-colors",
|
"absolute flex items-center justify-center rounded-full border transition-colors",
|
||||||
"-translate-x-1/2 -translate-y-1/2 cursor-pointer",
|
"-translate-x-1/2 -translate-y-1/2 cursor-pointer",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue