link with avatar impr
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user