Typeahead dropdown not showing on key stroke in Android Chrome/FF
See original GitHub issueDescribe the bug Hi! Appreciate your lib very much but I’m having a little trouble with typeahead feature. Hope you could help me here.
Here’s my setup which is pretty standard:
<ng-select [ngModel]="[]"
[items]="tags$ | async"
[typeahead]="tagsSubject$"
[bindLabel]="'fondname'"
[addTag]="false"
[multiple]="true"
[hideSelected]="true"
[trackByFn]="tagsTrackByFn"
[loading]="tagsLoading"
[disabled]="disableTagsInput"
[clearable]="false"
[clearOnBackspace]="false"
[placeholder]="'Search: Name, ISIN, Ticker'"
(add)="tagAdded($event)"
(remove)="tagRemoved($event.value)">
</ng-select>
public tags$: Observable<EtfQuickSearchProduct[]>;
public tagsSubject$ = new Subject<string>();
this.tags$ = this.tagsSubject$
.pipe(
tap(() => this.tagsLoading = true),
debounceTime(500),
distinctUntilChanged(),
switchMap(query => this.dataService.quickSearchRequest(query, 5)),
map(data => data.count ? data.results : []),
tap(() => this.tagsLoading = false),
catchError(() => of([])),
);
Everything works just fine on desktop Chrome, Firefox, Safari and on iOS Safari. But on Android Chrome and Firefox typeahead doesn’t work as expected. tagsSubject$ pipe is firing only after blurring input or entering ‘space’ symbol, not after last letter entered. Hitting ‘Enter’ also doesn’t help.
Expected behavior On Android Chrome/FF dropdown should API call should fire and dropdown should appear after letter is entered.
I suspect it has something to do with ComposeStart/ComposeEnd/Input event for inner input.
Screenshots
Smartphone (please complete the following information):
- Device: OnePlus 5
- OS: Android 8.1.0
- Browser Chrome 75.0.3770.143
Additional context
- Angular: 8.1.2
- ng-select: 3.0.5
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (1 by maintainers)
Issue-Label Bot is automatically applying the label
bug
to this issue, with a confidence of 0.82. Please mark this comment with 👍 or 👎 to give our bot feedback!Links: app homepage, dashboard and code for this bot.
Any idea how to fix this other than downgrading ng-select?