ngTagsInput icon indicating copy to clipboard operation
ngTagsInput copied to clipboard

Fixes bug on Android/Chrome because Android does not sends the correct keyCode

Open gnarvaja opened this issue 9 years ago • 6 comments

Manually detects comma from the input text.

gnarvaja avatar Jul 04 '16 01:07 gnarvaja

@gnarvaja The travis report shows you only need to change '==' to '===' on line 416 to pass the tests.

I have tested this code in Chrome Desktop and Android Chrome and it does seem to fix the problem with comma.

dprea avatar Aug 23 '16 01:08 dprea

Coverage Status

Coverage decreased (-0.4%) to 99.336% when pulling 46f609bdbfde496123b2f3776bed0a1927d8d1c9 on lambdasistemas:master into af9feb709f7c4ba03dca90e6a51b574f3a3e4fbc on mbenford:master.

coveralls avatar Sep 02 '16 18:09 coveralls

Was the problem that it would not detect when a user on Android or Chrome pressed the comma key? If that is the case, I am experiencing something similar.

SammyIsra avatar Sep 15 '16 17:09 SammyIsra

Coverage Status

Coverage decreased (-0.4%) to 99.336% when pulling a467d2cbdbda71db4dbb8a7b663f9b234121b202 on lambdasistemas:master into af9feb709f7c4ba03dca90e6a51b574f3a3e4fbc on mbenford:master.

coveralls avatar Oct 19 '16 15:10 coveralls

This getting merged anytime soon?

calebfaruki avatar Feb 15 '17 18:02 calebfaruki

Just wanted to note that this is not working for me. Not sure how it works for anyone. First, it only handles the comma case but the component supports space and enter as well. Second, and more importantly, because this runs during the keydown event, the input has not been updated with the key that was pressed. I.e. if the value of the input field is [email protected] and you type the comma, the comma is not part of the value during the event. The value is still [email protected] because the keydown happens before the value is updated. You'd need to type the comma again, and then it would work.

mikesnare avatar Dec 19 '17 15:12 mikesnare