From b1490c81a08b6aa6ed1d4931904cdc76bf036387 Mon Sep 17 00:00:00 2001 From: Giga Chubinidze Date: Mon, 3 Jul 2023 13:50:44 +0400 Subject: [PATCH] changed timeout to nexttick --- app/javascript/vue/label_template/insert_field_dropdown.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/vue/label_template/insert_field_dropdown.vue b/app/javascript/vue/label_template/insert_field_dropdown.vue index 700e3f490..64a6a0e8f 100644 --- a/app/javascript/vue/label_template/insert_field_dropdown.vue +++ b/app/javascript/vue/label_template/insert_field_dropdown.vue @@ -148,9 +148,9 @@ }); this.$nextTick(() => { $(this.$refs.dropdown).on('show.bs.dropdown', () => { - setTimeout(() => { + this.$nextTick(() => { $('.insert-field-dropdown')[1].focus() - }, 50); + }); this.searchValue = ''; }); });