Revision 61224
Added by Konstantinos Triantafyllou almost 2 years ago
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 | Trunk]: Input: Remove selection range causing focus issue on Safari