Autocomplete debounce does not work as expected
To optimize load of
/mentions/autocomplete I set the
debounce option of jQuery textcomplete to 500 ms. This should have made the autocomplete function be called with the delay.
In practice, however, with this option set the autocomplete function sometimes is not getting called at all, ever. Usually, this happens, when I put just
user:, i.e., a user link without any term (without a part of login, name or identifier). If, however, I add any character and then remove it (i.e., get the same
user: in result), the autocompletion gets executed.
If I remove the
debounce option, everything works as expected. This makes me think, that the problem is in how jQuery textcomplete handles the debounce.