@fundamental-ngx/cdk 0.58.0-rc.6 → 0.58.0-rc.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -325,7 +325,6 @@ function uuidv4() {
325
325
 
326
326
  class AutoCompleteDirective {
327
327
  /** @hidden */
328
- // eslint-disable-next-line @typescript-eslint/member-ordering
329
328
  constructor() {
330
329
  /** Whether the auto complete directive should be enabled */
331
330
  this.enable = true;
@@ -384,6 +383,15 @@ class AutoCompleteDirective {
384
383
  this._sendCompleteEvent(false);
385
384
  }
386
385
  else if (!this._isControlKey(event) && this.inputText) {
386
+ const hasSelection = this._elementRef.nativeElement.selectionStart !== this._elementRef.nativeElement.selectionEnd;
387
+ if (hasSelection) {
388
+ return;
389
+ }
390
+ const currentNativeValue = this._elementRef.nativeElement.value;
391
+ if (this.inputText.length > currentNativeValue.length + 1) {
392
+ this.inputText = currentNativeValue;
393
+ return;
394
+ }
387
395
  if (!this._triggerTypeAhead()) {
388
396
  return;
389
397
  }