Skip to content

AI-native design editor. Open-source Figma alternative.

fix(layers): stop double-clicks on row buttons from renaming the layer (#1313)

Danila Poyarkov4b4d132e827b
diff --git a/changes/1313/fixed.md b/changes/1313/fixed.md
new file mode 100644
index 000000000..8f13419d3
--- /dev/null
+++ b/changes/1313/fixed.md
@@ -0,0 +1 @@
+- Double-clicking a layer's expand arrow, lock, or visibility button in the layers panel no longer starts renaming the layer.
diff --git a/src/components/LayerTree/LayerTreeActions.vue b/src/components/LayerTree/LayerTreeActions.vue
index afe257e08..700696e72 100644
--- a/src/components/LayerTree/LayerTreeActions.vue
+++ b/src/components/LayerTree/LayerTreeActions.vue
@@ -31,6 +31,7 @@ const { menu: t } = useI18n()
:class="ui.action"
@pointerdown.stop
@click.stop="emit('toggleLock')"
+ @dblclick.stop
>
<icon-lucide-lock v-if="node.locked" data-slot="action-icon" :class="ui.lockIcon" />
<icon-lucide-unlock v-else data-slot="action-icon" :class="ui.lockIcon" />
@@ -44,6 +45,7 @@ const { menu: t } = useI18n()
:class="ui.action"
@pointerdown.stop
@click.stop="emit('toggleVisibility')"
+ @dblclick.stop
>
<icon-lucide-eye-off
v-if="!node.visible"
diff --git a/src/components/LayerTree/LayerTreeDisclosure.vue b/src/components/LayerTree/LayerTreeDisclosure.vue
index bbcc168f4..08b480824 100644
--- a/src/components/LayerTree/LayerTreeDisclosure.vue
+++ b/src/components/LayerTree/LayerTreeDisclosure.vue
@@ -19,6 +19,7 @@ const emit = defineEmits<{ toggle: [] }>()
:data-expanded="expanded || undefined"
:class="ui.disclosure"
@click.stop="emit('toggle')"
+ @dblclick.stop
>
<icon-lucide-chevron-right class="size-3" />
</button>