update gpu-switch-mode-indicator.tsx

This commit is contained in:
MacRimi
2026-04-09 20:12:21 +02:00
parent 1bbf814ea3
commit 13d2eeb9b2
2 changed files with 8 additions and 6 deletions

View File

@@ -29,10 +29,14 @@ export function GpuSwitchModeIndicator({
const vmColor = isVmActive ? "#a855f7" : inactiveColor
const handleClick = (e: React.MouseEvent) => {
e.stopPropagation()
if (isEditing && onToggle) {
onToggle(e)
// Only stop propagation and handle toggle when in editing mode
if (isEditing) {
e.stopPropagation()
if (onToggle) {
onToggle(e)
}
}
// When not editing, let the click propagate to the card to open the modal
}
return (