mapbox.js
mapbox.js copied to clipboard
Do not update geocoder control results on special keys
A small change that prevents geocoder control from autocompleting (and update and re-render results) when special key (like escape, tab, enter, arrow keys) was pressed.
Guys, any feedback please? Do I need to change/add/remove something?
I wonder if we can use the input
event instead. That would avoid needing to use keyCode
which is non-standard, deprecated, and system and implementation dependent.
/cc @tmcw
IE compatibility for input is pretty sketchy according to the MDN docs - no support for IE<9, and IE9 doesn't fire input when characters are deleted, which is a pretty common occurrence here.