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.

separatorKeys and separatorKeyCodes do not work on Android device.

See original GitHub issue

I’m submitting a … (check one with “x”)

[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request/question

Current behavior

I have added [separatorKeyCodes]=“[32, 188]” to separate tags for (space) and (,). It works great in IOS and browsers, but does not work on Android. When pressing space or comma in android, it gets added as a tag.

Expected behavior

If (space) or (,) characters are pressed in Android, a new tag should be created.

Angular version:

angular 2.4.8

ng2-tag-input version:

1.0.0 (had to use older version because I am still running ionic 2)

Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Android 7.0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Gbuompriscocommented, Aug 28, 2017

From the doc:

separatorKeyCodes - [?number[]]

Array of keyboard keys with which is possible to define the key for separating terms. By default, only Enter is the defined key.

separatorKeys - [?string[]]

Array of input characters with which is possible to define the key for separating terms. Default is empty. Can use with separatorKeyCodes, either one method matched will trigger tag separation.

In your case, you have keyCodes, not keys.

0reactions
BaneDCcommented, Jul 29, 2021

The problem is in android and how it sends key code. It is always 229. Here is a link that might help: https://stackoverflow.com/questions/36753548/keycode-on-android-is-always-229

Read more comments on GitHub >

github_iconTop Results From Across the Web

ng2-tag-input separatorKeys not working - Stack Overflow
Everything works, except separatorKeys - it has no effect, when I type space key (keyCode=32) , it behaves as a normal space instead...
Read more >
@angular/material | Yarn - Package Manager
Designing and Implementing a CDK combobox component; Continuing to focus on improving the accessibility of Angular Material components. About the team. The ...
Read more >
Chips - Angular Material
When a chip is not selectable, changes to its selected state are always ignored. ... A function to compare the option values with...
Read more >
@angular/material: Versions | Openbase
Custom Material themes should no longer access primary , accent , warn , is-dark , foreground and background from the theme map, but...
Read more >
Any idea why chrome devtools remote debug can't load ...
Issue Title Created Date Comment Count Updated Date Reboot does not occur 4 2021‑09‑17 2022‑10‑05 Brush scaling range settings 0 2021‑01‑26 2022‑10‑07 M00ex06 example error 1...
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