I have a form field which uses Jorn Zaefferer’s “autocomplete” jQuery plugin. If i type some text, then select part of it and hit backspace, the autocomplete list updates. But if i hit delete instead of backspace, the autocomplete list disappears.
I’m looking at the code for the plugin and it looks like the autocomplete updater is triggered by a keydown event in the field, and both backspace and delete trigger a keydown.
Is there a fundamental difference between backspace and delete that could be causing this ?
If you look at the
onChange()method, Del has a special purpose – to hide the autocomplete list:So no, there’s no fundamental difference in event behavior here, this is just how the autocomplete plugin is designed, the delete key is specifically intended to hide the list.