bug(matChipInputTokenEnd): Holding Enter Causes many matChipInputTokenEnd events #29883
Closed
1 task
Labels
area: material/chips
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Is this a regression?
The previous version in which this bug was not present was
No response
Description
I'm unsure if this is working as intended or if there is a working way to prevent this. If you go to one of your examples in stack blitz https://stackblitz.com/run?file=src%2Fapp%2Fchips-autocomplete-example.ts and add a console log to the add method and then hold down the enter key in the chip input, you'll see the event fire until you let go of the key.
I would expect it to use something like keyup to wait until the key has been released or prevent it from firing so much if a key is stuck or held for longer than a few ms.
Reproduction
StackBlitz link:
Steps to reproduce:
Expected Behavior
Only one event happens after key is released
Actual Behavior
Infinite events fire as key is held
Environment
The text was updated successfully, but these errors were encountered: