caioariede/django-location-field — pull request #17 by hirunatan (2014-01-22 10:23:19+00:00)
Title: Improve behaviour when user manually changes location field

Hi. I'm using this field in my project, it's very good, thanks. Only one thing: I think that the current behavior when the user directly type the coordinates in the location input is not very useful. I find three problems:

- When the user types in the location coordinate field, at each keystroke a geocoding query is launched, and then the whole field contents is replaced. This make very uncomfortable to type a complete coordinates in the field.
- If there are many quick keypresses, many queries are launched simultaneously, and some times this cause javascript crashes.
- I don't think it makes much sense to reverse geocode the coordinates. If the user is typing them directly in the field, is because she knows them in advance (e.g. copying them from other place), so its better to leave them untouched.

So i have changed it to use the "focus out" event (so that the map changes only when exiting the field) and to not do reverse geocoding. It seems much more useful for me (and my users). What do you think?