awesomplete icon indicating copy to clipboard operation
awesomplete copied to clipboard

Fire .change event when value in awesomplete input changes

Open karger opened this issue 9 years ago • 2 comments

Right now awesomplete fires an awesomplete-selectcomplete event whenever a selection is complete. But I often may not care about how the value of the input changed but only that it did. If the element also fired a normal change event, then I could write my code without depending on whether the input is or is not using awesomplete.

karger avatar Aug 24 '16 12:08 karger

Good point! We should also fire the input event if we do this.

LeaVerou avatar Aug 24 '16 14:08 LeaVerou

In the meantime you can workaround by:

var input = document.getElementById('textInputCSSID'); input.addEventListener("awesomplete-selectcomplete", function(event) { var changeEvent = new Event('change'); input.dispatchEvent(changeEvent); });

recurve avatar Jul 05 '18 03:07 recurve