From 73b9cf8d71e4c5c46346d3e8c507edb750ba161d Mon Sep 17 00:00:00 2001
From: Philipp Wolfer <ph.wolfer@gmail.com>
Date: Sat, 21 Nov 2020 14:23:35 +0100
Subject: [PATCH] Fix delete library modal closing immediately

The delete library button was not only opening the confirmation modal but also submitted the edit library form, causing the modal to close again.

Fixes #1272
---
 changes/changelog.d/1272.bugfix            | 1 +
 front/src/views/content/libraries/Form.vue | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
 create mode 100644 changes/changelog.d/1272.bugfix

diff --git a/changes/changelog.d/1272.bugfix b/changes/changelog.d/1272.bugfix
new file mode 100644
index 0000000000..67b8353f69
--- /dev/null
+++ b/changes/changelog.d/1272.bugfix
@@ -0,0 +1 @@
+Fix delete library modal closing immediately (#1272)
\ No newline at end of file
diff --git a/front/src/views/content/libraries/Form.vue b/front/src/views/content/libraries/Form.vue
index 0dafdf1557..dd8e642167 100644
--- a/front/src/views/content/libraries/Form.vue
+++ b/front/src/views/content/libraries/Form.vue
@@ -26,7 +26,7 @@
       <translate translate-context="Content/Library/Button.Label/Verb" v-if="library">Update library</translate>
       <translate translate-context="Content/Library/Button.Label/Verb" v-else>Create library</translate>
     </button>
-    <dangerous-button v-if="library" class="ui right floated basic danger button" @confirm="remove()">
+    <dangerous-button v-if="library" type="button" class="ui right floated basic danger button" @confirm="remove()">
       <translate translate-context="*/*/*/Verb">Delete</translate>
       <p slot="modal-header">
         <translate translate-context="Popup/Library/Title">Delete this library?</translate>
-- 
GitLab