ngx-chips: separatorKeys and separatorKeyCodes do not work on Android device.

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

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (3 by maintainers)

Most upvoted comments

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.