question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Selected value not shown, when keyboard has suggestion strip enabled on Android

See original GitHub issue

Describe the bug When searching and selecting a value from an ng-select input, the selected value is not shown in the input. This happens only on Android, when the virtual keyboard has suggestion strip on.

To Reproduce Steps to reproduce the behavior:

  1. Go to ng-select demo page
  2. Click on the select under Backend data with async pipe
  3. Write for example “me”
  4. Click “Mendoza Ruiz”
  5. See empty select input

Expected behavior The selected value is displayed.

Screenshots

ng-select-bug 2019-11-25 17_07_59

Desktop:

  • Does not reproduce on desktop

Smartphone:

  • Device: Pixel 2
  • OS: Android 10
  • Browser: Chrome
  • Version: 78
  • Suggestion strip has to be enabled, for instance on Pixel device in Settings → System → Languages & input → Virtual keyboard → Gboard → Text correction → Show suggestion strip

Additional context It seems that the compositionstart event is fired, but a subsequent compositionend is never fired on the search input, when the option is clicked:

https://github.com/ng-select/ng-select/blob/87908d3903d8afdfe538c0f7ee1afcbd3d42bcef/src/ng-select/lib/ng-select.component.html#L38

This means, that the internal this._isComposing flag does not get turned off:

https://github.com/ng-select/ng-select/blob/87908d3903d8afdfe538c0f7ee1afcbd3d42bcef/src/ng-select/lib/ng-select.component.ts#L538-L545

This results in the selected value not being displayed due to:

https://github.com/ng-select/ng-select/blob/87908d3903d8afdfe538c0f7ee1afcbd3d42bcef/src/ng-select/lib/ng-select.component.ts#L179

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:10
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
jpvanhalcommented, Apr 9, 2020

Could you please reopen this? The issue is still valid and there has been activity in this issue since the bot marked this stale.

4reactions
iRipVanWinklecommented, Dec 12, 2019

Hotfix: <ng-select #select (close)="select.blur()"></ng-select>

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Enable or Disable the Suggestion Strip in the Google ...
Procedure · Tap Apps · Tap Settings · Tap Language & Input · Tap Gboard · Tap Text Correction. Make sure Show suggestion...
Read more >
How to Fix Missing Suggestion Strip on Gboard ... - YouTube
How to Fix Missing Suggestion Strip on Gboard(Google keyboard )?Step 1: Tap on 'Settings'.Step 2: Tap on Search box or button on the...
Read more >
how to avoid the suggestions of keyboard for android in react ...
Your next best option is to go down that list of input types and try every single one until you find one that...
Read more >
Integrate autofill with keyboards - Android Developers
Beginning in Android 11, keyboards and other input-method editors (IMEs) can display autofill suggestions inline, in a suggestion strip or something similar ...
Read more >
How do I remove the prediction bar from SwiftKey? [You can't]
I do not want any suggestions. please tell me how to remove these? ... remove the annoying box that says 'No keyboard language...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found