mapbox.js icon indicating copy to clipboard operation
mapbox.js copied to clipboard

Do not update geocoder control results on special keys

Open kirach opened this issue 9 years ago • 3 comments

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.

kirach avatar Jan 14 '16 19:01 kirach

Guys, any feedback please? Do I need to change/add/remove something?

kirach avatar Jan 15 '16 19:01 kirach

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

jfirebaugh avatar Jan 20 '16 06:01 jfirebaugh

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.

tmcw avatar Mar 23 '16 22:03 tmcw