diff --git a/resources/assets/js/views/common/documents.js b/resources/assets/js/views/common/documents.js index 12f3db6e7..bb53fd334 100644 --- a/resources/assets/js/views/common/documents.js +++ b/resources/assets/js/views/common/documents.js @@ -97,18 +97,7 @@ const app = new Vue({ methods: { onRefFocus(ref, index) { - this.disableFormSubmission(); - - ref - ? ref === 'price' - ? setPromiseTimeout(100).then(() => this.$refs[ref][index].$children[0].$el.focus()) - : setPromiseTimeout(100).then(() => this.$refs[ref][index].focus()) - : {} - }, - - disableFormSubmission() { - const saveButtonEl = document.getElementsByClassName("btn btn-icon btn-success")[0]; - saveButtonEl.setAttribute("type", "button"); + setPromiseTimeout(100).then(() => this.$refs[ref][index].focus()); }, onCalculateTotal() { diff --git a/resources/views/components/documents/form/line-item.blade.php b/resources/views/components/documents/form/line-item.blade.php index 762569005..66449c21f 100644 --- a/resources/views/components/documents/form/line-item.blade.php +++ b/resources/views/components/documents/form/line-item.blade.php @@ -42,8 +42,7 @@ data-item="name" v-model="row.name" @input="onBindingItemField(index, 'name')" - @change="form.errors.clear('items.' + index + '.name')" - @keydown.enter="onRefFocus('description', index)"> + @change="form.errors.clear('items.' + index + '.name')"/>
@@ -68,7 +67,6 @@ resize="none" @input="onBindingItemField(index, 'description')" @keydown.enter.exact.prevent - @keydown.enter.exact="onRefFocus('quantity', index)" > @endif @@ -92,8 +90,7 @@ data-item="quantity" v-model="row.quantity" @input="onCalculateTotal" - @change="form.errors.clear('items.' + index + '.quantity')" - @keydown.enter="onRefFocus('price', index)"> + @change="form.errors.clear('items.' + index + '.quantity')">