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;