Cancel button is always disabled and shown conditionally
This commit is contained in:
Magnus Hovland Hoff 2018-10-05 11:03:41 +02:00
parent cffcc93b15
commit 65ad262bd8

View file

@ -75,6 +75,7 @@ function openEditor() {
const shadow = editor.querySelector('textarea.shadow-control'); const shadow = editor.querySelector('textarea.shadow-control');
const form = document.getElementById('article-editor'); const form = document.getElementById('article-editor');
const cancel = form.querySelector('.cancel'); const cancel = form.querySelector('.cancel');
const cancelButton = form.querySelector('button.button-cancel');
const cancelInteractionGroup = form.querySelector(".cancel-interaction-group"); const cancelInteractionGroup = form.querySelector(".cancel-interaction-group");
const footer = document.querySelector("footer"); const footer = document.querySelector("footer");
@ -109,6 +110,8 @@ function openEditor() {
el.disabled = !baseEnabled; el.disabled = !baseEnabled;
} }
cancelButton.disabled = true;
// TODO: edit-link in footer? // TODO: edit-link in footer?
} }