diff --git a/apps/geolibre-desktop/src/components/panels/LayerPanel.tsx b/apps/geolibre-desktop/src/components/panels/LayerPanel.tsx index 4e25c1f9a6..934fd93566 100644 --- a/apps/geolibre-desktop/src/components/panels/LayerPanel.tsx +++ b/apps/geolibre-desktop/src/components/panels/LayerPanel.tsx @@ -3210,6 +3210,10 @@ export function LayerPanel({ aria-pressed={selectedLayerIds.has(layer.id)} onClick={(e) => handleLayerSelection(e, layer.id)} onKeyDown={(e) => { + // Only act on the card itself: preventDefault here would + // otherwise cancel the Enter activation of the action + // buttons nested inside it. + if (e.target !== e.currentTarget) return; if (e.key === "Enter" || e.key === " ") { e.preventDefault(); setSelectedLayerIds(new Set([layer.id])); @@ -3389,7 +3393,7 @@ export function LayerPanel({ onChange={(v) => setLayerOpacity(layer.id, v)} /> )} -
+
+ {onOpenStylePanel && ( + + )}