From 65ad262bd82917f3990551b1d5f3077c729bc4d8 Mon Sep 17 00:00:00 2001 From: Magnus Hovland Hoff Date: Fri, 5 Oct 2018 11:03:41 +0200 Subject: [PATCH] Bugfix. Cancel button is always disabled and shown conditionally --- assets/script.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/script.js b/assets/script.js index 970578b..7932394 100644 --- a/assets/script.js +++ b/assets/script.js @@ -75,6 +75,7 @@ function openEditor() { const shadow = editor.querySelector('textarea.shadow-control'); const form = document.getElementById('article-editor'); const cancel = form.querySelector('.cancel'); + const cancelButton = form.querySelector('button.button-cancel'); const cancelInteractionGroup = form.querySelector(".cancel-interaction-group"); const footer = document.querySelector("footer"); @@ -109,6 +110,8 @@ function openEditor() { el.disabled = !baseEnabled; } + cancelButton.disabled = true; + // TODO: edit-link in footer? }