From 158ab34b57b787cadf631d434122f0ede1dcabc8 Mon Sep 17 00:00:00 2001
From: Max <max@nextcloud.com>
Date: Wed, 4 May 2022 10:37:19 +0200
Subject: fix: only show delete image button when editing

Also test for it being shown and triggering the deleteNode
when editing.

Signed-off-by: Max <max@nextcloud.com>
---
 src/nodes/ImageView.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/nodes/ImageView.vue')

diff --git a/src/nodes/ImageView.vue b/src/nodes/ImageView.vue
index 99dda2500..fd9e3de30 100644
--- a/src/nodes/ImageView.vue
+++ b/src/nodes/ImageView.vue
@@ -41,7 +41,7 @@
 							type="text"
 							:value="alt"
 							@keyup.enter="updateAlt()">
-						<div v-if="showIcons"
+						<div v-if="editor.isEditable && showIcons"
 							class="trash-icon"
 							title="Delete this image"
 							@click="deleteNode">
-- 
cgit v1.2.3

