I noticed that on my iPhone, when I have routes, but I want to go back and select a different autocomplete result (or "Current Location") from one of the dropdowns, it wasn't working. It just exits the search bar.
This is apparently because my solution for #103, the longstanding issue to make it easier to cancel a location edit, never worked on mobile Safari. When editing locations and the search bar is blurred, and nothing has changed, we exit out of the whole search bar on purpose to restore the routes you were looking at. Unless, that is, the search bar was blurred by focusing an autocomplete result.
But in mobile Safari,
I've hacked around this via the insight on this Stack Overflow answer that mousedown events occur before blur events:
NB: That question is about blurring an input by clicking a link -- links don't receive focus -- but on mobile Safari buttons also don't receive focus so it applies to us too.
I noticed that on my iPhone, when I have routes, but I want to go back and select a different autocomplete result (or "Current Location") from one of the dropdowns, it wasn't working. It just exits the search bar.
This is apparently because my solution for #103, the longstanding issue to make it easier to cancel a location edit, never worked on mobile Safari. When editing locations and the search bar is blurred, and nothing has changed, we exit out of the whole search bar on purpose to restore the routes you were looking at. Unless, that is, the search bar was blurred by focusing an autocomplete result.
But in mobile Safari,
I've hacked around this via the insight on this Stack Overflow answer that mousedown events occur before blur events:
https://stackoverflow.com/questions/7621711/how-to-prevent-blur-running-when-clicking-a-link-in-jquery
NB: That question is about blurring an input by clicking a link -- links don't receive focus -- but on mobile Safari buttons also don't receive focus so it applies to us too.