vaadin / flow

Vaadin Flow is a Java framework binding Vaadin web components to Java. This is part of Vaadin 10+.
Apache License 2.0
618 stars 167 forks source link

Adding multiple listeners for the same event type but with different debounce timeouts calls the listeners multiple times #4439

Open pekam opened 6 years ago

pekam commented 6 years ago

add(input);


Type one letter to the input element.
- Expected behavior
After 200ms, label "1" is added
After 1000ms, label "2" is added
- Actual behavior
After 200ms, two labels, "1" and "2" are added
After 1000ms, two more labels, "1" and "2" are added
Legioth commented 6 years ago

This only happens for cases where the timeout is the only difference between the listeners. There's logic that checks for a different filter and a different debounce phase, but no check for the exact timeout value.

I'm not sure if it's worth the overhead to also include the configured timeout duration in all event messages from the client just to be able to filter out irrelevant listeners in this particular case.