Revision 61226
Added by Konstantinos Triantafyllou almost 3 years ago
modules/uoa-services-library/branches/angular-11/ng-openaire-library/src/app/sharedComponents/input/input.component.ts | ||
---|---|---|
221 | 221 |
@HostListener('document:click', ['$event']) |
222 | 222 |
clickOut(event) { |
223 | 223 |
this.focused = !!this.elementRef.nativeElement.contains(event.target); |
224 |
if(!this.focused && this.input) { |
|
225 |
this.input.nativeElement.setSelectionRange(0,0); |
|
226 |
} |
|
227 | 224 |
this.focusEmitter.emit(this.focused); |
228 | 225 |
} |
229 | 226 |
|
Also available in: Unified diff
[Library | Angular 11]: Merges from trunk