From 3f9ca7aa78a8d0b1676acb7545f0b009de541df2 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Fri, 26 Sep 2025 09:38:51 +0300 Subject: [PATCH] link with avatar impr --- client/src/views/fields/user-with-avatar.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/src/views/fields/user-with-avatar.js b/client/src/views/fields/user-with-avatar.js index e42fb74906..299dcfdc31 100644 --- a/client/src/views/fields/user-with-avatar.js +++ b/client/src/views/fields/user-with-avatar.js @@ -61,7 +61,11 @@ class UserWithAvatarFieldView extends UserFieldView { setup() { super.setup(); - this.addHandler('keydown', `input[data-name="${this.nameName}"]`, (e, target) => { + this.addHandler('keydown', `input[data-name="${this.nameName}"]`, (/** KeyboardEvent */e, target) => { + if (e.code === 'Enter') { + return; + } + target.classList.add('being-typed'); }); @@ -69,6 +73,10 @@ class UserWithAvatarFieldView extends UserFieldView { setTimeout(() => target.classList.remove('being-typed'), 200); }); + this.addHandler('blur', `input[data-name="${this.nameName}"]`, (e, target) => { + target.classList.remove('being-typed'); + }); + this.on('change', () => { if (!this.isEditMode()) { return;