Skip to content

EspoCRM – Open Source CRM Application

link with avatar impr

Yuri Kuznetsov3f9ca7aa78a8
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;