From 75bc117b5f2205a4610abb0215aaf129cff8775f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Thu, 23 Feb 2023 17:47:25 +0300 Subject: [PATCH] fixed onRefFocus for document add item fire event ( 3764845708 ) --- resources/assets/js/views/common/documents.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/views/common/documents.js b/resources/assets/js/views/common/documents.js index ad05477c3..9cd25d4fb 100644 --- a/resources/assets/js/views/common/documents.js +++ b/resources/assets/js/views/common/documents.js @@ -128,7 +128,12 @@ const app = new Vue({ if (typeof (this.$refs['items-' + index + '-' + ref]) !== 'undefined') { let first_ref = this.$refs['items-' + index + '-' + ref]; - first_ref != undefined ? first_ref[0].focus() : this.$refs[Object.keys(this.$refs)[0]][0].focus(); + + if (first_ref != undefined) { + first_ref[0].focus(); + } else if (this.$refs[Object.keys(this.$refs)[0]] != undefined) { + this.$refs[Object.keys(this.$refs)[0]][0].focus(); + } } },