From 31067530a5e393aeac7da3b9ad9f5a441ee35187 Mon Sep 17 00:00:00 2001 From: Jonathan Adams Date: Wed, 1 Jul 2020 18:08:17 +0100 Subject: [PATCH] Fixes esphome/issues#1192 - Save on upload bug (#1107) --- esphome/dashboard/static/js/esphome.js | 1 + 1 file changed, 1 insertion(+) diff --git a/esphome/dashboard/static/js/esphome.js b/esphome/dashboard/static/js/esphome.js index f6e9979eb2..d80e5e4ec9 100644 --- a/esphome/dashboard/static/js/esphome.js +++ b/esphome/dashboard/static/js/esphome.js @@ -735,6 +735,7 @@ document.querySelectorAll("[data-action='edit']").forEach((button) => { const closeButton = document.querySelector("#js-editor-modal [data-action='close']"); saveButton.setAttribute('data-filename', editorActiveFilename); uploadButton.setAttribute('data-filename', editorActiveFilename); + uploadButton.setAttribute('onClick', `saveFile("${editorActiveFilename}")`); if (editorActiveFilename === "secrets.yaml") { uploadButton.classList.add("disabled"); editorActiveSecrets = true;