diff --git a/src/js/macros.js b/src/js/macros.js index a988993..a402d2c 100644 --- a/src/js/macros.js +++ b/src/js/macros.js @@ -70,12 +70,12 @@ module.exports = { this.$dispatch("macros-edited"); }, editedColor: function (event) { - if (this.config.macros[this.tab - 1].color != event.target.value) { + if (this.tab != 0 && this.config.macros[this.tab - 1].color != event.target.value) { this.$dispatch("macros-edited"); } }, editedName: function (event) { - if (this.config.macros[this.tab - 1].name != event.target.value) { + if (this.tab != 0 && this.config.macros[this.tab - 1].name != event.target.value) { this.$dispatch("macros-edited"); } }, diff --git a/src/pug/templates/macros.pug b/src/pug/templates/macros.pug index 25b9049..9456c8a 100644 --- a/src/pug/templates/macros.pug +++ b/src/pug/templates/macros.pug @@ -81,7 +81,7 @@ script#macros-template(type="text/x-template") p.title Macros Name .input-container input.input-color(type="color",id="macros-color",value="#ffffff",@change="editedColor") - input.input-name(type="text",minlength='1',maxlength='15',id="macros-name" ,v-model="macrosName",@change="editedName") + input.input-name(type="text",minlength='1',maxlength='15',id="macros-name" ,v-model="macrosName",@keypress="editedName") p.title Macros G-Code .flex-row-container select(id="gcode-select",title="Select previously uploaded GCode programs.",selected