Closed
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
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:
- Hold Enter Key in chip input
Expected Behavior
Only one event happens after key is released
Actual Behavior
Infinite events fire as key is held
Environment
- Angular: 18
- CDK/Material: 18
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows