Ngx-chips: Keycodes bug & design issue

Created on 2 Mar 2017  路  4Comments  路  Source: Gbuomprisco/ngx-chips

On adding the comma keycode: 188 as a separator.
Hitting backspace also triggers the entrance.

This is probably a bug that'll be very nice to solve.

But as a sidenote and I feel that this might be even more important than the mentioned bug, using keycode as the parameter to choose whether to split or not is a bad design.
Since for the first it is system dependant and for the second (and this is my opinion though I feel will be shared by everyone) we are trying to split based on the character, not on the phisical key being pressed.

bug

All 4 comments

Hi @Ignasimg,

the first is definitely a bug, will look into it.

About the second point, I understand why you disagree with the design. In principle, I basically inspired all the API from md-chips https://material.angularjs.org/latest/api/directive/mdChips.
I will look into this too, but in terms of priority it's not on the top of my list (as no one has complained yet except in this instance). Hope you understand.

Hm, I don't seem able to reproduce anymore the first issue

I can confirm and reproduce the backspace bug. The strange thing is if I put [separatorKeys] property in square brackets the bug disappears.

Hi @netopolit,

it's actually wrong in the examples: you do need the brackets. Also, please notice that the behaviour recently changed: you can now choose separatorKeys or separatorKeyCodes. The first is not fully supported by all browsers I guess - so up to you which one to choose :)

Also, I guess we can close this ticket now as I believe both the points should have been taken care of (thanks to a contributor :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MrBra1nwash picture MrBra1nwash  路  4Comments

Shinzah picture Shinzah  路  3Comments

rspandi1985 picture rspandi1985  路  4Comments

ImChamZ picture ImChamZ  路  5Comments

admix picture admix  路  5Comments