Skip to content

leaving input with tab should work (keyboard navigation) #54

Closed

Description

@karussell

When I type a location in the first input, then "tab" into second, then type a location in the second input and hit return it should show the route. Currently it is required that I select a location from both suggestion lists to update the route.

Also when copy and pasting a location as coordinate it does not route although no geocoding needs to be done.

Activity

  1. added
    enhancement
    on Apr 7, 2021
  2. changed the title [-]leaving input field and return should trigger update[/-] [+]leaving input field and pressing enter should trigger update[/+] on Apr 7, 2021
  3. changed the title [-]leaving input field and pressing enter should trigger update[/-] [+]pressing enter should trigger update[/+] on Apr 7, 2021
  4. added this to the 0.3 milestone on Apr 7, 2021
  5. karussell commented on Jun 3, 2021

    @karussell
    MemberAuthor

    The "keyboard-only" use case I had in mind with this issue still does not work properly: leaving the input via "tab" does not resolve the input via geocoding. (I should have explained this better what I had in mind )

    Additionally the focus is not in the "start"-input and does not switch to "destination"-input when pressing "tab" like graphhopper.com/maps currently does. E.g. try: open the URL, type "hamburg", press tab, type "munich", press enter.

  6. changed the title [-]pressing enter should trigger update[/-] [+]leaving input with tab should work (keyboard navigation)[/+] on Jun 3, 2021
  7. removed this from the 0.3 milestone on Jun 3, 2021
  8. Janekdererste commented on Jun 3, 2021

    @Janekdererste
    Collaborator

    So currently graphhopper.com/maps doesn't select anything from the autocomplete when tab is pressed in the search field. Somehow it finds a location anyway. (It even resolves ";klj" to a location :-)) So far we are more restrictive in maps2, meaning we only query a route when a geocoding result is selected.

    Do you want to select the first geocoding result when tab is pressed, or something else? The former is easy to do, only the tab order of the app would have to change. The latter would require more work I think.

  9. karussell commented on Jun 3, 2021

    @karussell
    MemberAuthor

    It is not high prio btw :)
    But yes, if no location is selected and tab is pressed I would pick the first location.

    currently graphhopper.com/maps doesn't select anything from the autocomplete

    Yes, the old version queries even queries nominatim instead of photon if the result is not picked from autocomplete (autocomplete comes from photon). This works quite well in practise (as nominatim is a bit better than photon but has no auto complete feature) but might be too ugly for our new version.

  10. easbar commented on Jun 8, 2021

    @easbar
    Member

    Maybe like this:

    1. enter start location -> autocomplete suggestions are shown and can be selected with up/down arrows or mouse OR we press tab or click somewhere in which case the suggestions list closes and the user input is left untouched
    2. enter target location -> same thing really
    3. Press Enter -> if autocomplete suggestions were picked, use them. otherwise either send geocoding to nominatim or use the input text directly in case it is a lat,lon pair.

    So basically the same as on graphhopper.com/maps :) I think this works quite well?! It's maybe a bit ugly that to use the better geocoder (nominatim) we need this 'workaround' of not selecting from the autocomplete list, but honestly I never even noticed this so far and with this workflow it also feels natural to enter GPS coordinates.

    One thing we could improve compared to graphhopper.com/maps: If I type something and then press enter before the autocomplete suggestions appear the cursor will be in the destination input box, but the suggestions for the start location are shown anyway and I cannot see the destination box anymore.

  11. added this to the 0.3 milestone on Jun 11, 2021
  12. karussell commented on Nov 11, 2022

    @karussell
    MemberAuthor

    It works when initially "tab" was pressed, but it is broken if I don't use the keyboard initially and paste a coordinate in the input and then press "tab", then the focus goes to the custom model button instead of the next location. Related to #267.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions