Change() not triggered if Ajax is called only once


#1

I couldn’t think of a way to reproduce this in JS Bin so I made my own test with a couple of files - https://playground.netparks.lv/select2/

If a custom value is put in the field, like “test123” or anything else and typing or pasting is done fast enough so that ajax call is made only once, change() function will not be triggered. As there is a 250 ms delay configured it can easily be worked around by typing slowly, but that’s quite annoying.

I’m not sure if versions play any role in this, but I tested with select2-4.0.8 and two jquery versions - 2.2.4 and 3.4.1
I tested with Firefox 68.0.2 and Brave 0.67.125 (both 64 bit and on Windows) and got the same results.

Is it an expected behavior?