From 3da606469fd90fa5ad43d96c58f1b72fd1b01253 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Fri, 27 Jun 2025 11:25:51 +0300 Subject: [PATCH] person name, phone focus --- client/src/views/fields/person-name.js | 11 +++++++++++ client/src/views/fields/phone.js | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/client/src/views/fields/person-name.js b/client/src/views/fields/person-name.js index 245ee4e3f0..7b37296217 100644 --- a/client/src/views/fields/person-name.js +++ b/client/src/views/fields/person-name.js @@ -289,6 +289,17 @@ class PersonNameFieldView extends VarcharFieldView { return name; } + + focusOnInlineEdit() { + /** @type {HTMLElement|null} */ + const input = this.element.querySelector('input.form-control[type="text"]'); + + if (!input) { + return; + } + + input.focus({preventScroll: true}); + } } export default PersonNameFieldView; diff --git a/client/src/views/fields/phone.js b/client/src/views/fields/phone.js index 867e51cd7f..85e155e037 100644 --- a/client/src/views/fields/phone.js +++ b/client/src/views/fields/phone.js @@ -876,6 +876,17 @@ class PhoneFieldView extends VarcharFieldView { }, }; } + + focusOnInlineEdit() { + /** @type {HTMLElement|null} */ + const input = this.element.querySelector('input.phone-number'); + + if (!input) { + return; + } + + input.focus({preventScroll: true}); + } } export default PhoneFieldView;